# ignite-45-330 - Example fixes.

Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/36d3a552
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/36d3a552
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/36d3a552

Branch: refs/heads/ignite-497-stick
Commit: 36d3a552ccdc6f9e0c2845de38222baba6734b49
Parents: 0bee444
Author: Dmitiry Setrakyan <dsetrak...@gridgain.com>
Authored: Sun Mar 22 22:43:49 2015 -0700
Committer: Dmitiry Setrakyan <dsetrak...@gridgain.com>
Committed: Sun Mar 22 22:43:49 2015 -0700

----------------------------------------------------------------------
 .../auto/CacheAutoStoreLoadDataExample.java     | 24 ++++----------------
 1 file changed, 4 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/36d3a552/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreLoadDataExample.java
----------------------------------------------------------------------
diff --git 
a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreLoadDataExample.java
 
b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreLoadDataExample.java
index 85e2291..ed9ebc0 100644
--- 
a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreLoadDataExample.java
+++ 
b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/auto/CacheAutoStoreLoadDataExample.java
@@ -73,33 +73,17 @@ public class CacheAutoStoreLoadDataExample {
             CacheConfiguration<Long, Person> cacheCfg = 
CacheConfig.jdbcPojoStoreCache();
 
             try (IgniteCache<Long, Person> cache = 
ignite.getOrCreateCache(cacheCfg)) {
-                System.out.println(">>> Load cache from database using custom 
SQL.");
-
-                System.out.println(">>> Cache size: " + cache.size());
-
-                long start = System.currentTimeMillis();
-
-                // Start loading cache from persistent store on all caching 
nodes.
+                // Load cache on all data nodes with custom SQL statement.
                 cache.loadCache(null, "java.lang.Long", "select * from PERSON 
where id <= 3");
 
-                long end = System.currentTimeMillis();
-
-                System.out.println(">>> Loaded " + cache.size() + " keys with 
backups in " + (end - start) + "ms.");
-
-                System.out.println(">>> Load cache data from database.");
+                System.out.println("Loaded cache entries: " + cache.size());
 
                 cache.clear();
 
-                System.out.println(">>> Cache size: " + cache.size());
-
-                start = System.currentTimeMillis();
-
-                // Start loading cache from persistent store on all caching 
nodes.
+                // Load cache on all data nodes with default SQL statement.
                 cache.loadCache(null);
 
-                end = System.currentTimeMillis();
-
-                System.out.println(">>> Loaded " + cache.size() + " keys with 
backups in " + (end - start) + "ms.");
+                System.out.println("Loaded cache entries: " + cache.size());
             }
         }
     }

Reply via email to