#Ignite-1.5 - Clear cache in query example.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9d478ae5 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9d478ae5 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9d478ae5 Branch: refs/heads/ignite-1537 Commit: 9d478ae5634e712143c9ea45801e612ec9b65bfd Parents: 40d7fcd Author: Alexey Goncharuk <[email protected]> Authored: Fri Dec 11 12:17:07 2015 +0300 Committer: Alexey Goncharuk <[email protected]> Committed: Fri Dec 11 12:17:07 2015 +0300 ---------------------------------------------------------------------- .../org/apache/ignite/examples/datagrid/CacheQueryExample.java | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/9d478ae5/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java index a593562..2d86cde 100644 --- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java +++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheQueryExample.java @@ -265,6 +265,9 @@ public class CacheQueryExample { private static void initialize() { IgniteCache<Long, Organization> orgCache = Ignition.ignite().cache(ORG_CACHE); + // Clear cache before running the example. + orgCache.clear(); + // Organizations. Organization org1 = new Organization("ApacheIgnite"); Organization org2 = new Organization("Other"); @@ -274,6 +277,9 @@ public class CacheQueryExample { IgniteCache<AffinityKey<Long>, Person> personCache = Ignition.ignite().cache(PERSON_CACHE); + // Clear cache before running the example. + personCache.clear(); + // People. Person p1 = new Person(org1, "John", "Doe", 2000, "John Doe has Master Degree."); Person p2 = new Person(org1, "Jane", "Doe", 1000, "Jane Doe has Bachelor Degree.");
