You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/02/02 13:13:47 UTC
[2/3] incubator-ignite git commit: #IGNITE-106: Remove word GridGain
from examples.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java
index 1e509ba..fc82bbb 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicSequenceExample.java
@@ -31,7 +31,7 @@ import java.util.*;
* enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
* <p>
* Alternatively you can run {@link CacheNodeStartup} in another JVM which will
- * start GridGain node with {@code examples/config/example-cache.xml} configuration.
+ * start node with {@code examples/config/example-cache.xml} configuration.
*/
public final class CacheAtomicSequenceExample {
/** Cache name. */
@@ -47,7 +47,7 @@ public final class CacheAtomicSequenceExample {
* @throws IgniteCheckedException If example execution failed.
*/
public static void main(String[] args) throws IgniteCheckedException {
- try (Ignite g = Ignition.start("examples/config/example-cache.xml")) {
+ try (Ignite ignite = Ignition.start("examples/config/example-cache.xml")) {
System.out.println();
System.out.println(">>> Cache atomic sequence example started.");
@@ -55,7 +55,7 @@ public final class CacheAtomicSequenceExample {
final String seqName = UUID.randomUUID().toString();
// Initialize atomic sequence in grid.
- CacheAtomicSequence seq = g.cache(CACHE_NAME).dataStructures().atomicSequence(seqName, 0, true);
+ CacheAtomicSequence seq = ignite.cache(CACHE_NAME).dataStructures().atomicSequence(seqName, 0, true);
// First value of atomic sequence on this node.
long firstVal = seq.get();
@@ -63,7 +63,7 @@ public final class CacheAtomicSequenceExample {
System.out.println("Sequence initial value: " + firstVal);
// Try increment atomic sequence on all grid nodes. Note that this node is also part of the grid.
- g.compute().run(new SequenceClosure(CACHE_NAME, seqName));
+ ignite.compute().run(new SequenceClosure(CACHE_NAME, seqName));
System.out.println("Sequence after incrementing [expected=" + (firstVal + RETRIES) + ", actual=" +
seq.get() + ']');
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java
index 696c2fe..ba611fd 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheAtomicStampedExample.java
@@ -31,7 +31,7 @@ import java.util.*;
* enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
* <p>
* Alternatively you can run {@link CacheNodeStartup} in another JVM which will
- * start GridGain node with {@code examples/config/example-cache.xml} configuration.
+ * start node with {@code examples/config/example-cache.xml} configuration.
*/
public final class CacheAtomicStampedExample {
/** Cache name. */
@@ -44,7 +44,7 @@ public final class CacheAtomicStampedExample {
* @throws IgniteCheckedException If example execution failed.
*/
public static void main(String[] args) throws IgniteCheckedException {
- try (Ignite g = Ignition.start("examples/config/example-cache.xml")) {
+ try (Ignite ignite = Ignition.start("examples/config/example-cache.xml")) {
System.out.println();
System.out.println(">>> Cache atomic stamped example started.");
@@ -58,7 +58,7 @@ public final class CacheAtomicStampedExample {
String stamp = UUID.randomUUID().toString();
// Initialize atomic stamped in cache.
- CacheAtomicStamped<String, String> stamped = g.cache(CACHE_NAME).dataStructures().
+ CacheAtomicStamped<String, String> stamped = ignite.cache(CACHE_NAME).dataStructures().
atomicStamped(stampedName, val, stamp, true);
System.out.println("Atomic stamped initial [value=" + stamped.value() + ", stamp=" + stamped.stamp() + ']');
@@ -67,7 +67,7 @@ public final class CacheAtomicStampedExample {
Runnable c = new StampedUpdateClosure(CACHE_NAME, stampedName);
// Check atomic stamped on all grid nodes.
- g.compute().run(c);
+ ignite.compute().run(c);
// Make new value of atomic stamped.
String newVal = UUID.randomUUID().toString();
@@ -81,7 +81,7 @@ public final class CacheAtomicStampedExample {
// Check atomic stamped on all grid nodes.
// Atomic stamped value and stamp shouldn't be changed.
- g.compute().run(c);
+ ignite.compute().run(c);
System.out.println("Try to change value and stamp of atomic stamped with correct value and stamp.");
@@ -89,7 +89,7 @@ public final class CacheAtomicStampedExample {
// Check atomic stamped on all grid nodes.
// Atomic stamped value and stamp should be changed.
- g.compute().run(c);
+ ignite.compute().run(c);
}
System.out.println();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java
index bd3c68b..9ddb9d7 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheCountDownLatchExample.java
@@ -31,7 +31,7 @@ import java.util.*;
* enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
* <p>
* Alternatively you can run {@link CacheNodeStartup} in another JVM which will
- * start GridGain node with {@code examples/config/example-cache.xml} configuration.
+ * start node with {@code examples/config/example-cache.xml} configuration.
*/
public class CacheCountDownLatchExample {
/** Cache name. */
@@ -47,7 +47,7 @@ public class CacheCountDownLatchExample {
* @throws IgniteCheckedException If example execution failed.
*/
public static void main(String[] args) throws Exception {
- try (Ignite g = Ignition.start("examples/config/example-cache.xml")) {
+ try (Ignite ignite = Ignition.start("examples/config/example-cache.xml")) {
System.out.println();
System.out.println(">>> Cache atomic countdown latch example started.");
@@ -55,14 +55,14 @@ public class CacheCountDownLatchExample {
final String latchName = UUID.randomUUID().toString();
// Initialize count down latch in grid.
- CacheCountDownLatch latch = g.cache(CACHE_NAME).dataStructures().
+ CacheCountDownLatch latch = ignite.cache(CACHE_NAME).dataStructures().
countDownLatch(latchName, INITIAL_COUNT, false, true);
System.out.println("Latch initial value: " + latch.count());
// Start waiting on the latch on all grid nodes.
for (int i = 0; i < INITIAL_COUNT; i++)
- g.compute().run(new LatchClosure(CACHE_NAME, latchName));
+ ignite.compute().run(new LatchClosure(CACHE_NAME, latchName));
// Wait for latch to go down which essentially means that all remote closures completed.
latch.await();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheQueueExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheQueueExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheQueueExample.java
index ae1f3b9..d0b4a15 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheQueueExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheQueueExample.java
@@ -32,7 +32,7 @@ import java.util.*;
* enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
* <p>
* Alternatively you can run {@link CacheNodeStartup} in another JVM which will
- * start GridGain node with {@code examples/config/example-cache.xml} configuration.
+ * start node with {@code examples/config/example-cache.xml} configuration.
*/
public class CacheQueueExample {
/** Cache name. */
@@ -51,20 +51,20 @@ public class CacheQueueExample {
* @throws IgniteCheckedException If example execution failed.
*/
public static void main(String[] args) throws IgniteCheckedException {
- try (Ignite g = Ignition.start("examples/config/example-cache.xml")) {
+ try (Ignite ignite = Ignition.start("examples/config/example-cache.xml")) {
System.out.println();
System.out.println(">>> Cache queue example started.");
// Make queue name.
String queueName = UUID.randomUUID().toString();
- queue = initializeQueue(g, queueName);
+ queue = initializeQueue(ignite, queueName);
- readFromQueue(g);
+ readFromQueue(ignite);
- writeToQueue(g);
+ writeToQueue(ignite);
- clearAndRemoveQueue(g);
+ clearAndRemoveQueue(ignite);
}
System.out.println("Cache queue example finished.");
@@ -73,18 +73,18 @@ public class CacheQueueExample {
/**
* Initialize queue.
*
- * @param g Grid.
+ * @param ignite Ignite.
* @param queueName Name of queue.
* @return Queue.
* @throws IgniteCheckedException If execution failed.
*/
- private static CacheQueue<String> initializeQueue(Ignite g, String queueName) throws IgniteCheckedException {
+ private static CacheQueue<String> initializeQueue(Ignite ignite, String queueName) throws IgniteCheckedException {
// Initialize new FIFO queue.
- CacheQueue<String> queue = g.cache(CACHE_NAME).dataStructures().queue(queueName, 0, false, true);
+ CacheQueue<String> queue = ignite.cache(CACHE_NAME).dataStructures().queue(queueName, 0, false, true);
// Initialize queue items.
// We will be use blocking operation and queue size must be appropriated.
- for (int i = 0; i < g.cluster().nodes().size() * RETRIES * 2; i++)
+ for (int i = 0; i < ignite.cluster().nodes().size() * RETRIES * 2; i++)
queue.put(Integer.toString(i));
System.out.println("Queue size after initializing: " + queue.size());
@@ -95,14 +95,14 @@ public class CacheQueueExample {
/**
* Read items from head and tail of queue.
*
- * @param g Grid.
+ * @param ignite Ignite.
* @throws IgniteCheckedException If failed.
*/
- private static void readFromQueue(Ignite g) throws IgniteCheckedException {
+ private static void readFromQueue(Ignite ignite) throws IgniteCheckedException {
final String queueName = queue.name();
// Read queue items on each node.
- g.compute().run(new QueueClosure(CACHE_NAME, queueName, false));
+ ignite.compute().run(new QueueClosure(CACHE_NAME, queueName, false));
System.out.println("Queue size after reading [expected=0, actual=" + queue.size() + ']');
}
@@ -110,16 +110,16 @@ public class CacheQueueExample {
/**
* Write items into queue.
*
- * @param g Grid.
+ * @param ignite Ignite.
* @throws IgniteCheckedException If failed.
*/
- private static void writeToQueue(Ignite g) throws IgniteCheckedException {
+ private static void writeToQueue(Ignite ignite) throws IgniteCheckedException {
final String queueName = queue.name();
// Write queue items on each node.
- g.compute().run(new QueueClosure(CACHE_NAME, queueName, true));
+ ignite.compute().run(new QueueClosure(CACHE_NAME, queueName, true));
- System.out.println("Queue size after writing [expected=" + g.cluster().nodes().size() * RETRIES +
+ System.out.println("Queue size after writing [expected=" + ignite.cluster().nodes().size() * RETRIES +
", actual=" + queue.size() + ']');
System.out.println("Iterate over queue.");
@@ -132,10 +132,10 @@ public class CacheQueueExample {
/**
* Clear and remove queue.
*
- * @param g Grid.
+ * @param ignite Ignite.
* @throws IgniteCheckedException If execution failed.
*/
- private static void clearAndRemoveQueue(Ignite g) throws IgniteCheckedException {
+ private static void clearAndRemoveQueue(Ignite ignite) throws IgniteCheckedException {
System.out.println("Queue size before clearing: " + queue.size());
// Clear queue.
@@ -144,7 +144,7 @@ public class CacheQueueExample {
System.out.println("Queue size after clearing: " + queue.size());
// Remove queue from cache.
- g.cache(CACHE_NAME).dataStructures().removeQueue(queue.name());
+ ignite.cache(CACHE_NAME).dataStructures().removeQueue(queue.name());
// Try to work with removed queue.
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheSetExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheSetExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheSetExample.java
index dc68b1e..da49ea7 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheSetExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/datastructures/CacheSetExample.java
@@ -31,7 +31,7 @@ import java.util.*;
* enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
* <p>
* Alternatively you can run {@link CacheNodeStartup} in another JVM which will
- * start GridGain node with {@code examples/config/example-cache.xml} configuration.
+ * start node with {@code examples/config/example-cache.xml} configuration.
*/
public class CacheSetExample {
/** Cache name. */
@@ -47,18 +47,18 @@ public class CacheSetExample {
* @throws IgniteCheckedException If example execution failed.
*/
public static void main(String[] args) throws IgniteCheckedException {
- try (Ignite g = Ignition.start("examples/config/example-cache.xml")) {
+ try (Ignite ignite = Ignition.start("examples/config/example-cache.xml")) {
System.out.println();
System.out.println(">>> Cache set example started.");
// Make set name.
String setName = UUID.randomUUID().toString();
- set = initializeSet(g, setName);
+ set = initializeSet(ignite, setName);
- writeToSet(g);
+ writeToSet(ignite);
- clearAndRemoveSet(g);
+ clearAndRemoveSet(ignite);
}
System.out.println("Cache set example finished.");
@@ -67,14 +67,14 @@ public class CacheSetExample {
/**
* Initialize set.
*
- * @param g Grid.
+ * @param ignite Ignite.
* @param setName Name of set.
* @return Set.
* @throws IgniteCheckedException If execution failed.
*/
- private static CacheSet<String> initializeSet(Ignite g, String setName) throws IgniteCheckedException {
+ private static CacheSet<String> initializeSet(Ignite ignite, String setName) throws IgniteCheckedException {
// Initialize new set.
- CacheSet<String> set = g.cache(CACHE_NAME).dataStructures().set(setName, false, true);
+ CacheSet<String> set = ignite.cache(CACHE_NAME).dataStructures().set(setName, false, true);
// Initialize set items.
for (int i = 0; i < 10; i++)
@@ -88,16 +88,16 @@ public class CacheSetExample {
/**
* Write items into set.
*
- * @param g Grid.
+ * @param ignite Ignite.
* @throws IgniteCheckedException If failed.
*/
- private static void writeToSet(Ignite g) throws IgniteCheckedException {
+ private static void writeToSet(Ignite ignite) throws IgniteCheckedException {
final String setName = set.name();
// Write set items on each node.
- g.compute().broadcast(new SetClosure(CACHE_NAME, setName));
+ ignite.compute().broadcast(new SetClosure(CACHE_NAME, setName));
- System.out.println("Set size after writing [expected=" + (10 + g.cluster().nodes().size() * 5) +
+ System.out.println("Set size after writing [expected=" + (10 + ignite.cluster().nodes().size() * 5) +
", actual=" + set.size() + ']');
System.out.println("Iterate over set.");
@@ -126,10 +126,10 @@ public class CacheSetExample {
/**
* Clear and remove set.
*
- * @param g Grid.
+ * @param ignite Ignite.
* @throws IgniteCheckedException If execution failed.
*/
- private static void clearAndRemoveSet(Ignite g) throws IgniteCheckedException {
+ private static void clearAndRemoveSet(Ignite ignite) throws IgniteCheckedException {
System.out.println("Set size before clearing: " + set.size());
// Clear set.
@@ -138,7 +138,7 @@ public class CacheSetExample {
System.out.println("Set size after clearing: " + set.size());
// Remove set from cache.
- g.cache(CACHE_NAME).dataStructures().removeSet(set.name());
+ ignite.cache(CACHE_NAME).dataStructures().removeSet(set.name());
System.out.println("Set was removed: " + set.removed());
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/datagrid/hibernate/HibernateL2CacheExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/hibernate/HibernateL2CacheExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/hibernate/HibernateL2CacheExample.java
index 20c377c..e674502 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/hibernate/HibernateL2CacheExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/hibernate/HibernateL2CacheExample.java
@@ -29,7 +29,7 @@ import java.net.*;
import java.util.*;
/**
- * This example demonstrates the use of GridGain In-Memory Data Grid as a Hibernate
+ * This example demonstrates the use of Ignite In-Memory Data Grid as a Hibernate
* Second-Level cache provider.
* <p>
* The Hibernate Second-Level cache (or "L2 cache" shortly) lets you significantly
@@ -40,16 +40,16 @@ import java.util.*;
* This example defines 2 entity classes: {@link User} and {@link Post}, with
* 1 <-> N relation, and marks them with appropriate annotations for Hibernate
* object-relational mapping to SQL tables of an underlying H2 in-memory database.
- * The example launches GridGain node in the same JVM and registers it in
+ * The example launches node in the same JVM and registers it in
* Hibernate configuration as an L2 cache implementation. It then stores and
* queries instances of the entity classes to and from the database, having
- * Hibernate SQL output, L2 cache statistics output, and GridGain cache metrics
+ * Hibernate SQL output, L2 cache statistics output, and Ignite cache metrics
* output enabled.
* <p>
* When running example, it's easy to notice that when an object is first
* put into a database, the L2 cache is not used and it's contents is empty.
* However, when an object is first read from the database, it is immediately
- * stored in L2 cache (which is GridGain In-Memory Data Grid in fact), which can
+ * stored in L2 cache (which is Ignite In-Memory Data Grid in fact), which can
* be seen in stats output. Further requests of the same object only read the data
* from L2 cache and do not hit the database.
* <p>
@@ -83,8 +83,8 @@ public class HibernateL2CacheExample {
* @throws IgniteCheckedException If example execution failed.
*/
public static void main(String[] args) throws IgniteCheckedException {
- // Start the GridGain node, run the example, and stop the node when finished.
- try (Ignite g = Ignition.start(HibernateL2CacheExampleNodeStartup.configuration())) {
+ // Start the node, run the example, and stop the node when finished.
+ try (Ignite ignite = Ignition.start(HibernateL2CacheExampleNodeStartup.configuration())) {
// We use a single session factory, but create a dedicated session
// for each transaction or query. This way we ensure that L1 cache
// is not used (L1 cache has per-session scope only).
@@ -121,7 +121,7 @@ public class HibernateL2CacheExample {
ses.close();
}
- // Output L2 cache and GridGain cache stats. You may notice that
+ // Output L2 cache and Ignite cache stats. You may notice that
// at this point the object is not yet stored in L2 cache, because
// the read was not yet performed.
printStats(sesFactory);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
index 2283b3c..6a0688a 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java
@@ -31,7 +31,7 @@ import java.util.concurrent.*;
* <i>Dimensions</i> can be referenced or joined by other <i>dimensions</i> or <i>facts</i>,
* however, <i>facts</i> are generally not referenced by other facts. You can view <i>dimensions</i>
* as your master or reference data, while <i>facts</i> are usually large data sets of events or
- * other objects that continuously come into the system and may change frequently. In GridGain
+ * other objects that continuously come into the system and may change frequently. In Ignite
* such architecture is supported via cross-cache queries. By storing <i>dimensions</i> in
* {@link org.apache.ignite.cache.CacheMode#REPLICATED REPLICATED} caches and <i>facts</i> in much larger
* {@link org.apache.ignite.cache.CacheMode#PARTITIONED PARTITIONED} caches you can freely execute distributed joins across
@@ -45,7 +45,7 @@ import java.util.concurrent.*;
* enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
* <p>
* Alternatively you can run {@link CacheNodeStartup} in another JVM which will
- * start GridGain node with {@code examples/config/example-cache.xml} configuration.
+ * start node with {@code examples/config/example-cache.xml} configuration.
*/
public class CacheStarSchemaExample {
/** Partitioned cache name. */
@@ -64,14 +64,14 @@ public class CacheStarSchemaExample {
* @throws IgniteCheckedException If example execution failed.
*/
public static void main(String[] args) throws Exception {
- Ignite g = Ignition.start("examples/config/example-cache.xml");
+ Ignite ignite = Ignition.start("examples/config/example-cache.xml");
System.out.println();
System.out.println(">>> Cache star schema example started.");
// Clean up caches on all nodes before run.
- g.jcache(PARTITIONED_CACHE_NAME).clear();
- g.jcache(REPLICATED_CACHE_NAME).clear();
+ ignite.jcache(PARTITIONED_CACHE_NAME).clear();
+ ignite.jcache(REPLICATED_CACHE_NAME).clear();
try {
populateDimensions();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheStoreExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheStoreExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheStoreExample.java
index 06b2ab8..32bb0e1 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheStoreExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheStoreExample.java
@@ -45,16 +45,16 @@ public class CacheStoreExample {
IgniteConfiguration cfg = CacheNodeWithStoreStartup.configure();
// To start grid with desired configuration uncomment the appropriate line.
- try (Ignite g = Ignition.start(cfg)) {
+ try (Ignite ignite = Ignition.start(cfg)) {
System.out.println();
System.out.println(">>> Cache store example started.");
- IgniteCache<Long, Person> cache = g.jcache(null);
+ IgniteCache<Long, Person> cache = ignite.jcache(null);
// Clean up caches on all nodes before run.
cache.clear();
- try (IgniteTx tx = g.transactions().txStart()) {
+ try (IgniteTx tx = ignite.transactions().txStart()) {
Person val = cache.get(id);
System.out.println("Read value: " + val);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheStoreLoadDataExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheStoreLoadDataExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheStoreLoadDataExample.java
index 907d789..0c9b1ef 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheStoreLoadDataExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheStoreLoadDataExample.java
@@ -47,11 +47,11 @@ public class CacheStoreLoadDataExample {
public static void main(String[] args) throws Exception {
ExamplesUtils.checkMinMemory(MIN_MEMORY);
- try (Ignite g = Ignition.start(CacheNodeWithStoreStartup.configure())) {
+ try (Ignite ignite = Ignition.start(CacheNodeWithStoreStartup.configure())) {
System.out.println();
System.out.println(">>> Cache store load data example started.");
- final IgniteCache<String, Integer> cache = g.jcache(null);
+ final IgniteCache<String, Integer> cache = ignite.jcache(null);
// Clean up caches on all nodes before run.
cache.clear();
@@ -59,8 +59,9 @@ public class CacheStoreLoadDataExample {
long start = System.currentTimeMillis();
// Start loading cache on all caching nodes.
- g.compute(g.cluster().forCache(null)).broadcast(new IgniteCallable<Object>() {
- @Override public Object call() throws Exception {
+ ignite.compute(ignite.cluster().forCache(null)).broadcast(new IgniteCallable<Object>() {
+ @Override
+ public Object call() throws Exception {
// Load cache from persistent store.
cache.loadCache(null, 0, ENTRY_COUNT);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyPersonStore.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyPersonStore.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyPersonStore.java
index f5c54f5..fc91b80 100644
--- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyPersonStore.java
+++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyPersonStore.java
@@ -83,7 +83,7 @@ public class CacheDummyPersonStore extends CacheStoreAdapter<Long, Person> {
// Generate dummy person on the fly.
Person p = new Person(i, "first-" + i, "last-" + 1);
- // GridGain will automatically discard entries that don't belong on this node,
+ // Ignite will automatically discard entries that don't belong on this node,
// but we check if local node is primary or backup anyway just to demonstrate that we can.
// Ideally, partition ID of a key would be stored in the database and only keys
// for partitions that belong on this node would be loaded from database.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/events/EventsExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/events/EventsExample.java b/examples/src/main/java/org/apache/ignite/examples/events/EventsExample.java
index fb30474..80288cc 100644
--- a/examples/src/main/java/org/apache/ignite/examples/events/EventsExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/events/EventsExample.java
@@ -36,7 +36,7 @@ import static org.apache.ignite.events.IgniteEventType.*;
* Remote nodes should always be started with configuration: {@code 'ignite.sh examples/config/example-compute.xml'}.
* <p>
* Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start
- * GridGain node with {@code examples/config/example-compute.xml} configuration.
+ * node with {@code examples/config/example-compute.xml} configuration.
*/
public class EventsExample {
/**
@@ -70,7 +70,7 @@ public class EventsExample {
System.out.println();
System.out.println(">>> Local event listener example.");
- Ignite g = Ignition.ignite();
+ Ignite ignite = Ignition.ignite();
IgnitePredicate<IgniteTaskEvent> lsnr = new IgnitePredicate<IgniteTaskEvent>() {
@Override public boolean apply(IgniteTaskEvent evt) {
@@ -81,17 +81,17 @@ public class EventsExample {
};
// Register event listener for all local task execution events.
- g.events().localListen(lsnr, EVTS_TASK_EXECUTION);
+ ignite.events().localListen(lsnr, EVTS_TASK_EXECUTION);
// Generate task events.
- g.compute().withName("example-event-task").run(new IgniteRunnable() {
+ ignite.compute().withName("example-event-task").run(new IgniteRunnable() {
@Override public void run() {
System.out.println("Executing sample job.");
}
});
// Unsubscribe local task event listener.
- g.events().stopLocalListen(lsnr);
+ ignite.events().stopLocalListen(lsnr);
}
/**
@@ -123,14 +123,14 @@ public class EventsExample {
}
};
- Ignite g = Ignition.ignite();
+ Ignite ignite = Ignition.ignite();
// Register event listeners on all nodes to listen for task events.
- g.events().remoteListen(locLsnr, rmtLsnr, EVTS_TASK_EXECUTION);
+ ignite.events().remoteListen(locLsnr, rmtLsnr, EVTS_TASK_EXECUTION);
// Generate task events.
for (int i = 0; i < 10; i++) {
- g.compute().withName(i < 5 ? "good-task-" + i : "bad-task-" + i).run(new IgniteRunnable() {
+ ignite.compute().withName(i < 5 ? "good-task-" + i : "bad-task-" + i).run(new IgniteRunnable() {
// Auto-inject task session.
@IgniteTaskSessionResource
private ComputeTaskSession ses;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsExample.java b/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsExample.java
index b8fa35e..23c2507 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsExample.java
@@ -25,7 +25,7 @@ import java.io.*;
import java.util.*;
/**
- * Example that shows usage of {@link org.apache.ignite.IgniteFs} API. It starts a GridGain node with {@code GGFS}
+ * Example that shows usage of {@link org.apache.ignite.IgniteFs} API. It starts a node with {@code GGFS}
* configured and performs several file system operations (create, write, append, read and delete
* files, create, list and delete directories).
* <p>
@@ -33,7 +33,7 @@ import java.util.*;
* GGFS: {@code 'ignite.sh examples/config/filesystem/example-ggfs.xml'}.
* <p>
* Alternatively you can run {@link GgfsNodeStartup} in another JVM which will start
- * GridGain node with {@code examples/config/filesystem/example-ggfs.xml} configuration.
+ * node with {@code examples/config/filesystem/example-ggfs.xml} configuration.
*/
public final class GgfsExample {
/**
@@ -43,14 +43,14 @@ public final class GgfsExample {
* @throws IgniteCheckedException If example execution failed.
*/
public static void main(String[] args) throws Exception {
- Ignite g = Ignition.start("examples/config/filesystem/example-ggfs.xml");
+ Ignite ignite = Ignition.start("examples/config/filesystem/example-ggfs.xml");
System.out.println();
System.out.println(">>> GGFS example started.");
try {
- // Get an instance of GridGain File System.
- IgniteFs fs = g.fileSystem("ggfs");
+ // Get an instance of Ignite File System.
+ IgniteFs fs = ignite.fileSystem("ggfs");
// Working directory path.
IgniteFsPath workDir = new IgniteFsPath("/examples/ggfs");
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsMapReduceExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsMapReduceExample.java b/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsMapReduceExample.java
index 3813e2d..1c2106b 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsMapReduceExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsMapReduceExample.java
@@ -34,7 +34,7 @@ import java.util.*;
* GGFS: {@code 'ignite.sh examples/config/filesystem/example-ggfs.xml'}.
* <p>
* Alternatively you can run {@link GgfsNodeStartup} in another JVM which will start
- * GridGain node with {@code examples/config/filesystem/example-ggfs.xml} configuration.
+ * node with {@code examples/config/filesystem/example-ggfs.xml} configuration.
*/
public class GgfsMapReduceExample {
/**
@@ -49,7 +49,7 @@ public class GgfsMapReduceExample {
else if (args.length == 1)
System.out.println("Please provide regular expression.");
else {
- try (Ignite g = Ignition.start("examples/config/filesystem/example-ggfs.xml")) {
+ try (Ignite ignite = Ignition.start("examples/config/filesystem/example-ggfs.xml")) {
System.out.println();
System.out.println(">>> GGFS map reduce example started.");
@@ -60,8 +60,8 @@ public class GgfsMapReduceExample {
String regexStr = args[1];
- // Get an instance of GridGain File System.
- IgniteFs fs = g.fileSystem("ggfs");
+ // Get an instance of Ignite File System.
+ IgniteFs fs = ignite.fileSystem("ggfs");
// Working directory path.
IgniteFsPath workDir = new IgniteFsPath("/examples/ggfs");
@@ -87,10 +87,10 @@ public class GgfsMapReduceExample {
}
/**
- * Write file to the GridGain file system.
+ * Write file to the Ignite file system.
*
- * @param fs GridGain file system.
- * @param fsPath GridGain file system path.
+ * @param fs Ignite file system.
+ * @param fsPath Ignite file system path.
* @param file File to write.
* @throws Exception In case of exception.
*/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsNodeStartup.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsNodeStartup.java b/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsNodeStartup.java
index e2cfea6..605eb81 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsNodeStartup.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ggfs/GgfsNodeStartup.java
@@ -21,7 +21,7 @@ import org.apache.ignite.*;
/**
* Starts up an empty node with GGFS configuration.
- * You can also start a stand-alone GridGain instance by passing the path
+ * You can also start a stand-alone Ignite instance by passing the path
* to configuration file to {@code 'ignite.{sh|bat}'} script, like so:
* {@code 'ignite.sh examples/config/filesystem/example-ggfs.xml'}.
* <p>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/ggfs/package.html
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ggfs/package.html b/examples/src/main/java/org/apache/ignite/examples/ggfs/package.html
index 47f55e5..80941e2 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ggfs/package.html
+++ b/examples/src/main/java/org/apache/ignite/examples/ggfs/package.html
@@ -18,6 +18,6 @@
<html>
<body>
<!-- Package description. -->
- Demonstrates using of GridGain File System.
+ Demonstrates using of Ignite File System.
</body>
</html>
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingExample.java b/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingExample.java
index 2629a64..f09b10b 100644
--- a/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingExample.java
@@ -36,7 +36,7 @@ import java.util.concurrent.*;
* Remote nodes should always be started with special configuration file which
* enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
* <p>
- * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
+ * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start node
* with {@code examples/config/example-compute.xml} configuration.
*/
public final class MessagingExample {
@@ -53,15 +53,15 @@ public final class MessagingExample {
* @throws IgniteCheckedException If example execution failed.
*/
public static void main(String[] args) throws Exception {
- try (Ignite g = Ignition.start("examples/config/example-compute.xml")) {
- if (!ExamplesUtils.checkMinTopologySize(g.cluster(), 2))
+ try (Ignite ignite = Ignition.start("examples/config/example-compute.xml")) {
+ if (!ExamplesUtils.checkMinTopologySize(ignite.cluster(), 2))
return;
System.out.println();
System.out.println(">>> Messaging example started.");
// Projection for remote nodes.
- ClusterGroup rmtPrj = g.cluster().forRemotes();
+ ClusterGroup rmtPrj = ignite.cluster().forRemotes();
// Listen for messages from remote nodes to make sure that they received all the messages.
int msgCnt = rmtPrj.nodes().size() * MESSAGES_NUM;
@@ -69,20 +69,20 @@ public final class MessagingExample {
CountDownLatch orderedLatch = new CountDownLatch(msgCnt);
CountDownLatch unorderedLatch = new CountDownLatch(msgCnt);
- localListen(g.message(g.cluster().forLocal()), orderedLatch, unorderedLatch);
+ localListen(ignite.message(ignite.cluster().forLocal()), orderedLatch, unorderedLatch);
// Register listeners on all grid nodes.
- startListening(g.message(rmtPrj));
+ startListening(ignite.message(rmtPrj));
// Send unordered messages to all remote nodes.
for (int i = 0; i < MESSAGES_NUM; i++)
- g.message(rmtPrj).send(TOPIC.UNORDERED, Integer.toString(i));
+ ignite.message(rmtPrj).send(TOPIC.UNORDERED, Integer.toString(i));
System.out.println(">>> Finished sending unordered messages.");
// Send ordered messages to all remote nodes.
for (int i = 0; i < MESSAGES_NUM; i++)
- g.message(rmtPrj).sendOrdered(TOPIC.ORDERED, Integer.toString(i), 0);
+ ignite.message(rmtPrj).sendOrdered(TOPIC.ORDERED, Integer.toString(i), 0);
System.out.println(">>> Finished sending ordered messages.");
System.out.println(">>> Check output on all nodes for message printouts.");
@@ -105,13 +105,13 @@ public final class MessagingExample {
// Add ordered message listener.
msg.remoteListen(TOPIC.ORDERED, new IgniteBiPredicate<UUID, String>() {
@IgniteInstanceResource
- private Ignite g;
+ private Ignite ignite;
@Override public boolean apply(UUID nodeId, String msg) {
System.out.println("Received ordered message [msg=" + msg + ", fromNodeId=" + nodeId + ']');
try {
- g.message(g.cluster().forNodeId(nodeId)).send(TOPIC.ORDERED, msg);
+ ignite.message(ignite.cluster().forNodeId(nodeId)).send(TOPIC.ORDERED, msg);
}
catch (IgniteCheckedException e) {
e.printStackTrace();
@@ -124,13 +124,13 @@ public final class MessagingExample {
// Add unordered message listener.
msg.remoteListen(TOPIC.UNORDERED, new IgniteBiPredicate<UUID, String>() {
@IgniteInstanceResource
- private Ignite g;
+ private Ignite ignite;
@Override public boolean apply(UUID nodeId, String msg) {
System.out.println("Received unordered message [msg=" + msg + ", fromNodeId=" + nodeId + ']');
try {
- g.message(g.cluster().forNodeId(nodeId)).send(TOPIC.UNORDERED, msg);
+ ignite.message(ignite.cluster().forNodeId(nodeId)).send(TOPIC.UNORDERED, msg);
}
catch (IgniteCheckedException e) {
e.printStackTrace();
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongExample.java b/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongExample.java
index a22b2aa..67f20ae 100644
--- a/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongExample.java
@@ -35,7 +35,7 @@ import java.util.concurrent.*;
* Remote nodes should always be started with special configuration file which
* enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
* <p>
- * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
+ * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start node
* with {@code examples/config/example-compute.xml} configuration.
*/
public class MessagingPingPongExample {
@@ -47,15 +47,15 @@ public class MessagingPingPongExample {
*/
public static void main(String[] args) throws IgniteCheckedException {
// Game is played over the default grid.
- try (Ignite g = Ignition.start("examples/config/example-compute.xml")) {
- if (!ExamplesUtils.checkMinTopologySize(g.cluster(), 2))
+ try (Ignite ignite = Ignition.start("examples/config/example-compute.xml")) {
+ if (!ExamplesUtils.checkMinTopologySize(ignite.cluster(), 2))
return;
System.out.println();
System.out.println(">>> Messaging ping-pong example started.");
// Pick random remote node as a partner.
- ClusterGroup nodeB = g.cluster().forRemotes().forRandom();
+ ClusterGroup nodeB = ignite.cluster().forRemotes().forRandom();
// Note that both nodeA and nodeB will always point to
// same nodes regardless of whether they were implicitly
@@ -63,7 +63,7 @@ public class MessagingPingPongExample {
// anonymous closure's state during its remote execution.
// Set up remote player.
- g.message(nodeB).remoteListen(null, new IgniteBiPredicate<UUID, String>() {
+ ignite.message(nodeB).remoteListen(null, new IgniteBiPredicate<UUID, String>() {
/** This will be injected on node listener comes to. */
@IgniteInstanceResource
private Ignite ignite;
@@ -91,20 +91,20 @@ public class MessagingPingPongExample {
final CountDownLatch cnt = new CountDownLatch(MAX_PLAYS);
// Set up local player.
- g.message().localListen(null, new IgniteBiPredicate<UUID, String>() {
+ ignite.message().localListen(null, new IgniteBiPredicate<UUID, String>() {
@Override public boolean apply(UUID nodeId, String rcvMsg) {
System.out.println("Received message [msg=" + rcvMsg + ", sender=" + nodeId + ']');
try {
if (cnt.getCount() == 1) {
- g.message(g.cluster().forNodeId(nodeId)).send(null, "STOP");
+ ignite.message(ignite.cluster().forNodeId(nodeId)).send(null, "STOP");
cnt.countDown();
return false; // Stop listening.
}
else if ("PONG".equals(rcvMsg))
- g.message(g.cluster().forNodeId(nodeId)).send(null, "PING");
+ ignite.message(ignite.cluster().forNodeId(nodeId)).send(null, "PING");
else
throw new RuntimeException("Received unexpected message: " + rcvMsg);
@@ -119,7 +119,7 @@ public class MessagingPingPongExample {
});
// Serve!
- g.message(nodeB).send(null, "PING");
+ ignite.message(nodeB).send(null, "PING");
// Wait til the game is over.
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongListenActorExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongListenActorExample.java b/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongListenActorExample.java
index eec94a7..5c9416e 100644
--- a/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongListenActorExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongListenActorExample.java
@@ -33,7 +33,7 @@ import java.util.concurrent.*;
* Remote nodes should always be started with special configuration file which
* enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
* <p>
- * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
+ * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start node
* with {@code examples/config/example-compute.xml} configuration.
*/
public class MessagingPingPongListenActorExample {
@@ -45,17 +45,17 @@ public class MessagingPingPongListenActorExample {
*/
public static void main(String[] args) throws IgniteCheckedException {
// Game is played over the default grid.
- try (Ignite g = Ignition.start("examples/config/example-compute.xml")) {
- if (!ExamplesUtils.checkMinTopologySize(g.cluster(), 2))
+ try (Ignite ignite = Ignition.start("examples/config/example-compute.xml")) {
+ if (!ExamplesUtils.checkMinTopologySize(ignite.cluster(), 2))
return;
System.out.println();
System.out.println(">>> Messaging ping-pong listen actor example started.");
// Pick first remote node as a partner.
- Collection<ClusterNode> rmtNodes = g.cluster().forRemotes().nodes();
+ Collection<ClusterNode> rmtNodes = ignite.cluster().forRemotes().nodes();
- ClusterGroup nodeB = g.cluster().forNode(rmtNodes.iterator().next());
+ ClusterGroup nodeB = ignite.cluster().forNode(rmtNodes.iterator().next());
// Note that both nodeA and nodeB will always point to
// same nodes regardless of whether they were implicitly
@@ -63,7 +63,7 @@ public class MessagingPingPongListenActorExample {
// anonymous closure's state during its remote execution.
// Set up remote player.
- g.message(nodeB).remoteListen(null, new MessagingListenActor<String>() {
+ ignite.message(nodeB).remoteListen(null, new MessagingListenActor<String>() {
@Override public void receive(UUID nodeId, String rcvMsg) throws IgniteCheckedException {
System.out.println(rcvMsg);
@@ -79,7 +79,7 @@ public class MessagingPingPongListenActorExample {
final CountDownLatch cnt = new CountDownLatch(MAX_PLAYS);
// Set up local player.
- g.message().localListen(null, new MessagingListenActor<String>() {
+ ignite.message().localListen(null, new MessagingListenActor<String>() {
@Override protected void receive(UUID nodeId, String rcvMsg) throws IgniteCheckedException {
System.out.println(rcvMsg);
@@ -93,7 +93,7 @@ public class MessagingPingPongListenActorExample {
});
// Serve!
- g.message(nodeB).send(null, "PING");
+ ignite.message(nodeB).send(null, "PING");
// Wait til the game is over.
try {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExample.java b/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExample.java
index 04597b2..d5d2574 100644
--- a/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/misc/client/memcache/MemcacheRestExample.java
@@ -27,9 +27,9 @@ import java.net.*;
import java.util.*;
/**
- * This example shows how to use Memcache client for manipulating GridGain cache.
+ * This example shows how to use Memcache client for manipulating Ignite cache.
* <p>
- * GridGain implements Memcache binary protocol and it is available if
+ * Ignite implements Memcache binary protocol and it is available if
* REST is enabled on the node.
* Remote nodes should always be started using {@link MemcacheRestExampleNodeStartup}.
*/
@@ -47,11 +47,11 @@ public class MemcacheRestExample {
public static void main(String[] args) throws Exception {
MemcachedClient client = null;
- try (Ignite g = Ignition.start(MemcacheRestExampleNodeStartup.configuration())) {
+ try (Ignite ignite = Ignition.start(MemcacheRestExampleNodeStartup.configuration())) {
System.out.println();
System.out.println(">>> Memcache REST example started.");
- GridCache<String, Object> cache = g.cache(null);
+ GridCache<String, Object> cache = ignite.cache(null);
client = startMemcachedClient(host, port);
@@ -60,8 +60,8 @@ public class MemcacheRestExample {
System.out.println(">>> Successfully put string value using Memcache client.");
// Check that string value is actually in cache using traditional
- // GridGain API and Memcache binary protocol.
- System.out.println(">>> Getting value for 'strKey' using GridGain cache API: " + cache.get("strKey"));
+ // Ignite API and Memcache binary protocol.
+ System.out.println(">>> Getting value for 'strKey' using Ignite cache API: " + cache.get("strKey"));
System.out.println(">>> Getting value for 'strKey' using Memcache client: " + client.get("strKey"));
// Remove string value from cache using Memcache binary protocol.
@@ -76,8 +76,8 @@ public class MemcacheRestExample {
System.out.println(">>> Successfully put integer value using Memcache client.");
// Check that integer value is actually in cache using traditional
- // GridGain API and Memcache binary protocol.
- System.out.println(">>> Getting value for 'intKey' using GridGain cache API: " + cache.get("intKey"));
+ // Ignite API and Memcache binary protocol.
+ System.out.println(">>> Getting value for 'intKey' using Ignite cache API: " + cache.get("intKey"));
System.out.println(">>> Getting value for 'intKey' using Memcache client: " + client.get("intKey"));
// Remove string value from cache using Memcache binary protocol.
@@ -94,14 +94,14 @@ public class MemcacheRestExample {
if (client.incr("atomicLong", 5, 0) == 15)
System.out.println(">>> Successfully incremented atomic long by 5.");
- // Increment atomic long using GridGain API and check that value is correct.
+ // Increment atomic long using Ignite API and check that value is correct.
System.out.println(">>> New atomic long value: " + l.incrementAndGet() + " (expected: 16).");
// Decrement atomic long by 3 using Memcache client.
if (client.decr("atomicLong", 3, 0) == 13)
System.out.println(">>> Successfully decremented atomic long by 3.");
- // Decrement atomic long using GridGain API and check that value is correct.
+ // Decrement atomic long using Ignite API and check that value is correct.
System.out.println(">>> New atomic long value: " + l.decrementAndGet() + " (expected: 12).");
}
finally {
@@ -111,7 +111,7 @@ public class MemcacheRestExample {
}
/**
- * Creates Memcache client that uses binary protocol and connects to GridGain.
+ * Creates Memcache client that uses binary protocol and connects to Ignite.
*
* @param host Hostname.
* @param port Port number.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/misc/deployment/DeploymentExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/deployment/DeploymentExample.java b/examples/src/main/java/org/apache/ignite/examples/misc/deployment/DeploymentExample.java
index 64151f6..a234ac5 100644
--- a/examples/src/main/java/org/apache/ignite/examples/misc/deployment/DeploymentExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/misc/deployment/DeploymentExample.java
@@ -43,7 +43,7 @@ import java.util.*;
* enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-cache.xml'}.
* <p>
* Alternatively you can run {@link ComputeNodeStartup} in another JVM which will
- * start GridGain node with {@code examples/config/example-compute.xml} configuration.
+ * start node with {@code examples/config/example-compute.xml} configuration.
*/
public final class DeploymentExample {
/** Name of the deployed task. */
@@ -56,7 +56,7 @@ public final class DeploymentExample {
* @throws IgniteCheckedException If example execution failed.
*/
public static void main(String[] args) throws IgniteCheckedException {
- try (Ignite g = Ignition.start("examples/config/example-compute.xml")) {
+ try (Ignite ignite = Ignition.start("examples/config/example-compute.xml")) {
System.out.println();
System.out.println(">>> Deployment example started.");
@@ -67,21 +67,21 @@ public final class DeploymentExample {
// 'GridCompute.localDeployTask(Class, ClassLoader) apply and
// then use 'GridCompute.execute(String, Object)' method
// passing your task name as first parameter.
- g.compute().localDeployTask(ExampleTask.class, ExampleTask.class.getClassLoader());
+ ignite.compute().localDeployTask(ExampleTask.class, ExampleTask.class.getClassLoader());
- for (Map.Entry<String, Class<? extends ComputeTask<?, ?>>> e : g.compute().localTasks().entrySet())
+ for (Map.Entry<String, Class<? extends ComputeTask<?, ?>>> e : ignite.compute().localTasks().entrySet())
System.out.println(">>> Found locally deployed task [alias=" + e.getKey() + ", taskCls=" + e.getValue());
// Execute the task passing its name as a parameter. The system will find
// the deployed task by its name and execute it.
- g.compute().execute(TASK_NAME, null);
+ ignite.compute().execute(TASK_NAME, null);
// Execute the task passing class name as a parameter. The system will find
// the deployed task by its class name and execute it.
// g.compute().execute(ExampleTask.class.getName(), null).get();
// Undeploy task
- g.compute().undeployTask(TASK_NAME);
+ ignite.compute().undeployTask(TASK_NAME);
System.out.println();
System.out.println(">>> Finished executing Grid Direct Deployment Example.");
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/LifecycleExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/LifecycleExample.java b/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/LifecycleExample.java
index f4fe684..6462a14 100644
--- a/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/LifecycleExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/misc/lifecycle/LifecycleExample.java
@@ -26,7 +26,7 @@ import static org.apache.ignite.lifecycle.LifecycleEventType.*;
/**
* This example shows how to provide your own {@link org.apache.ignite.lifecycle.LifecycleBean} implementation
- * to be able to hook into GridGain lifecycle. The {@link LifecycleExampleBean} bean
+ * to be able to hook into Ignite lifecycle. The {@link LifecycleExampleBean} bean
* will output occurred lifecycle events to the console.
* <p>
* This example does not require remote nodes to be started.
@@ -50,7 +50,7 @@ public final class LifecycleExample {
// Provide lifecycle bean to configuration.
cfg.setLifecycleBeans(bean);
- try (Ignite g = Ignition.start(cfg)) {
+ try (Ignite ignite = Ignition.start(cfg)) {
// Make sure that lifecycle bean was notified about grid startup.
assert bean.isStarted();
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/misc/springbean/SpringBeanExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/misc/springbean/SpringBeanExample.java b/examples/src/main/java/org/apache/ignite/examples/misc/springbean/SpringBeanExample.java
index 709fb2b..96953d6 100644
--- a/examples/src/main/java/org/apache/ignite/examples/misc/springbean/SpringBeanExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/misc/springbean/SpringBeanExample.java
@@ -24,7 +24,7 @@ import org.springframework.context.support.*;
import java.util.concurrent.*;
/**
- * Demonstrates a simple use of GridGain grid configured with Spring.
+ * Demonstrates a simple use of Ignite grid configured with Spring.
* <p>
* String "Hello World." is printed out by Callable passed into
* the executor service provided by Grid. This statement could be printed
@@ -38,7 +38,7 @@ import java.util.concurrent.*;
* Remote nodes should always be started with special configuration file which
* enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
* <p>
- * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
+ * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start node
* with {@code examples/config/example-compute.xml} configuration.
*/
public final class SpringBeanExample {
@@ -58,10 +58,10 @@ public final class SpringBeanExample {
try {
// Get grid from Spring (note that local grid node is already started).
- Ignite g = (Ignite)ctx.getBean("mySpringBean");
+ Ignite ignite = (Ignite)ctx.getBean("mySpringBean");
// Execute any method on the retrieved grid instance.
- ExecutorService exec = g.executorService();
+ ExecutorService exec = ignite.executorService();
Future<String> res = exec.submit(new Callable<String>() {
@Override public String call() throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/services/ServicesExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/services/ServicesExample.java b/examples/src/main/java/org/apache/ignite/examples/services/ServicesExample.java
index 7481137..4771f44 100644
--- a/examples/src/main/java/org/apache/ignite/examples/services/ServicesExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/services/ServicesExample.java
@@ -26,12 +26,12 @@ import org.apache.ignite.resources.*;
import java.util.*;
/**
- * Example that demonstrates how to deploy distributed services in GridGain.
+ * Example that demonstrates how to deploy distributed services in Ignite.
* Distributed services are especially useful when deploying singletons on the grid,
* be that cluster-singleton, or per-node-singleton, etc...
* <p>
* To start remote nodes, you must run {@link ComputeNodeStartup} in another JVM
- * which will start GridGain node with {@code examples/config/example-compute.xml} configuration.
+ * which will start node with {@code examples/config/example-compute.xml} configuration.
* <p>
* NOTE:<br/>
* Starting {@code ignite.sh} directly will not work, as distributed services
@@ -81,7 +81,7 @@ public class ServicesExample {
/**
* Simple example to demonstrate service proxy invocation of a remotely deployed service.
*
- * @param ignite Grid instance.
+ * @param ignite Ignite instance.
* @throws Exception If failed.
*/
private static void serviceProxyExample(Ignite ignite) throws Exception {
@@ -111,7 +111,7 @@ public class ServicesExample {
/**
* Simple example to demonstrate how to inject service proxy into distributed closures.
*
- * @param ignite Grid instance.
+ * @param ignite Ignite instance.
* @throws Exception If failed.
*/
private static void serviceInjectionExample(Ignite ignite) throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingCheckInExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingCheckInExample.java b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingCheckInExample.java
index 6423d1e..a126074 100644
--- a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingCheckInExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingCheckInExample.java
@@ -59,7 +59,7 @@ import java.util.concurrent.*;
* {@code IGNITE_HOME/examples} folder. After that {@code gridgain-examples.jar}
* will be generated by Maven in {@code IGNITE_HOME/examples/target} folder.
* <p>
- * Alternatively you can run {@link StreamingNodeStartup} in another JVM which will start GridGain node
+ * Alternatively you can run {@link StreamingNodeStartup} in another JVM which will start node
* with {@code examples/config/example-streamer.xml} configuration.
*/
public class StreamingCheckInExample {
@@ -107,14 +107,14 @@ public class StreamingCheckInExample {
Timer timer = new Timer("check-in-query-worker");
// Start grid.
- final Ignite g = Ignition.start("examples/config/example-streamer.xml");
+ final Ignite ignite = Ignition.start("examples/config/example-streamer.xml");
System.out.println();
System.out.println(">>> Streaming check-in example started.");
try {
// Get the streamer.
- IgniteStreamer streamer = g.streamer(STREAMER_NAME);
+ IgniteStreamer streamer = ignite.streamer(STREAMER_NAME);
assert streamer != null;
@@ -135,13 +135,13 @@ public class StreamingCheckInExample {
// Reset all streamers on all nodes to make sure that
// consecutive executions start from scratch.
- g.compute().broadcast(new Runnable() {
+ ignite.compute().broadcast(new Runnable() {
@Override public void run() {
- if (!ExamplesUtils.hasStreamer(g, STREAMER_NAME))
+ if (!ExamplesUtils.hasStreamer(ignite, STREAMER_NAME))
System.err.println("Default streamer not found (is example-streamer.xml " +
"configuration used on all nodes?)");
else {
- IgniteStreamer streamer = g.streamer(STREAMER_NAME);
+ IgniteStreamer streamer = ignite.streamer(STREAMER_NAME);
System.out.println("Clearing streamer data.");
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPopularNumbersExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPopularNumbersExample.java b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPopularNumbersExample.java
index 81e91f9..d7421ba 100644
--- a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPopularNumbersExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPopularNumbersExample.java
@@ -42,7 +42,7 @@ import java.util.*;
* {@code IGNITE_HOME/examples} folder. After that {@code gridgain-examples.jar}
* will be generated by Maven in {@code IGNITE_HOME/examples/target} folder.
* <p>
- * Alternatively you can run {@link StreamingNodeStartup} in another JVM which will start GridGain node
+ * Alternatively you can run {@link StreamingNodeStartup} in another JVM which will start node
* with {@code examples/config/example-streamer.xml} configuration.
*/
public class StreamingPopularNumbersExample {
@@ -97,16 +97,16 @@ public class StreamingPopularNumbersExample {
Timer popularNumbersQryTimer = new Timer("numbers-query-worker");
// Start grid.
- final Ignite g = Ignition.start("examples/config/example-streamer.xml");
+ final Ignite ignite = Ignition.start("examples/config/example-streamer.xml");
System.out.println();
System.out.println(">>> Streaming popular numbers example started.");
try {
// Schedule query to find most popular words to run every 3 seconds.
- TimerTask task = scheduleQuery(g, popularNumbersQryTimer);
+ TimerTask task = scheduleQuery(ignite, popularNumbersQryTimer);
- streamData(g);
+ streamData(ignite);
// Force one more run to get final counts.
task.run();
@@ -115,13 +115,13 @@ public class StreamingPopularNumbersExample {
// Reset all streamers on all nodes to make sure that
// consecutive executions start from scratch.
- g.compute().broadcast(new Runnable() {
+ ignite.compute().broadcast(new Runnable() {
@Override public void run() {
- if (!ExamplesUtils.hasStreamer(g, "popular-numbers"))
+ if (!ExamplesUtils.hasStreamer(ignite, "popular-numbers"))
System.err.println("Default streamer not found (is example-streamer.xml " +
"configuration used on all nodes?)");
else {
- IgniteStreamer streamer = g.streamer("popular-numbers");
+ IgniteStreamer streamer = ignite.streamer("popular-numbers");
System.out.println("Clearing number counters from streamer.");
@@ -138,11 +138,11 @@ public class StreamingPopularNumbersExample {
/**
* Streams random numbers into the system.
*
- * @param g Grid.
+ * @param ignite Ignite.
* @throws IgniteCheckedException If failed.
*/
- private static void streamData(final Ignite g) throws IgniteCheckedException {
- final IgniteStreamer streamer = g.streamer("popular-numbers");
+ private static void streamData(final Ignite ignite) throws IgniteCheckedException {
+ final IgniteStreamer streamer = ignite.streamer("popular-numbers");
// Use gaussian distribution to ensure that
// numbers closer to 0 have higher probability.
@@ -153,14 +153,14 @@ public class StreamingPopularNumbersExample {
/**
* Schedules our popular numbers query to run every 3 seconds.
*
- * @param g Grid.
+ * @param ignite Ignite.
* @param timer Timer.
* @return Scheduled task.
*/
- private static TimerTask scheduleQuery(final Ignite g, Timer timer) {
+ private static TimerTask scheduleQuery(final Ignite ignite, Timer timer) {
TimerTask task = new TimerTask() {
@Override public void run() {
- final IgniteStreamer streamer = g.streamer("popular-numbers");
+ final IgniteStreamer streamer = ignite.streamer("popular-numbers");
try {
// Send reduce query to all 'popular-numbers' streamers
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPriceBarsExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPriceBarsExample.java b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPriceBarsExample.java
index 584e55a..06a1d17 100644
--- a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPriceBarsExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingPriceBarsExample.java
@@ -49,11 +49,11 @@ import java.util.concurrent.*;
* {@code 'ignite.{sh|bat} examples/config/example-streamer.xml'}.
* When starting nodes this way JAR file containing the examples code
* should be placed to {@code IGNITE_HOME/libs} folder. You can build
- * {@code gridgain-examples.jar} by running {@code mvn package} in
- * {@code IGNITE_HOME/examples} folder. After that {@code gridgain-examples.jar}
+ * {@code ignite-examples.jar} by running {@code mvn package} in
+ * {@code IGNITE_HOME/examples} folder. After that {@code ignite-examples.jar}
* will be generated by Maven in {@code IGNITE_HOME/examples/target} folder.
* <p>
- * Alternatively you can run {@link StreamingNodeStartup} in another JVM which will start GridGain node
+ * Alternatively you can run {@link StreamingNodeStartup} in another JVM which will start node
* with {@code examples/config/example-streamer.xml} configuration.
*/
public class StreamingPriceBarsExample {
@@ -79,15 +79,15 @@ public class StreamingPriceBarsExample {
Timer timer = new Timer("priceBars");
// Start grid.
- final Ignite g = Ignition.start("examples/config/example-streamer.xml");
+ final Ignite ignite = Ignition.start("examples/config/example-streamer.xml");
System.out.println();
System.out.println(">>> Streaming price bars example started.");
try {
- TimerTask task = scheduleQuery(g, timer);
+ TimerTask task = scheduleQuery(ignite, timer);
- streamData(g);
+ streamData(ignite);
// Force one more run to get final results.
task.run();
@@ -96,13 +96,13 @@ public class StreamingPriceBarsExample {
// Reset all streamers on all nodes to make sure that
// consecutive executions start from scratch.
- g.compute().broadcast(new Runnable() {
+ ignite.compute().broadcast(new Runnable() {
@Override public void run() {
- if (!ExamplesUtils.hasStreamer(g, "priceBars"))
+ if (!ExamplesUtils.hasStreamer(ignite, "priceBars"))
System.err.println("Default streamer not found (is example-streamer.xml " +
"configuration used on all nodes?)");
else {
- IgniteStreamer streamer = g.streamer("priceBars");
+ IgniteStreamer streamer = ignite.streamer("priceBars");
System.out.println("Clearing bars from streamer.");
@@ -119,14 +119,14 @@ public class StreamingPriceBarsExample {
/**
* Schedules the query to periodically output built bars to the console.
*
- * @param g Grid.
+ * @param ignite Ignite.
* @param timer Timer.
* @return Scheduled task.
*/
- private static TimerTask scheduleQuery(final Ignite g, Timer timer) {
+ private static TimerTask scheduleQuery(final Ignite ignite, Timer timer) {
TimerTask task = new TimerTask() {
@Override public void run() {
- final IgniteStreamer streamer = g.streamer("priceBars");
+ final IgniteStreamer streamer = ignite.streamer("priceBars");
try {
Collection<Bar> bars = streamer.context().reduce(
@@ -179,11 +179,11 @@ public class StreamingPriceBarsExample {
/**
* Streams random prices into the system.
*
- * @param g Grid.
+ * @param ignite Ignite.
* @throws IgniteCheckedException If failed.
*/
- private static void streamData(final Ignite g) throws IgniteCheckedException {
- IgniteStreamer streamer = g.streamer("priceBars");
+ private static void streamData(final Ignite ignite) throws IgniteCheckedException {
+ IgniteStreamer streamer = ignite.streamer("priceBars");
for (int i = 0; i < CNT; i++) {
for (int j = 0; j < INSTRUMENTS.length; j++) {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingRunningAverageExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingRunningAverageExample.java b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingRunningAverageExample.java
index 7ccbf42..b46c60d 100644
--- a/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingRunningAverageExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/streaming/StreamingRunningAverageExample.java
@@ -35,11 +35,11 @@ import java.util.concurrent.*;
* {@code 'ignite.{sh|bat} examples/config/example-streamer.xml'}.
* When starting nodes this way JAR file containing the examples code
* should be placed to {@code IGNITE_HOME/libs} folder. You can build
- * {@code gridgain-examples.jar} by running {@code mvn package} in
- * {@code IGNITE_HOME/examples} folder. After that {@code gridgain-examples.jar}
+ * {@code ignite-examples.jar} by running {@code mvn package} in
+ * {@code IGNITE_HOME/examples} folder. After that {@code ignite-examples.jar}
* will be generated by Maven in {@code IGNITE_HOME/examples/target} folder.
* <p>
- * Alternatively you can run {@link StreamingNodeStartup} in another JVM which will start GridGain node
+ * Alternatively you can run {@link StreamingNodeStartup} in another JVM which will start node
* with {@code examples/config/example-streamer.xml} configuration.
*/
public class StreamingRunningAverageExample {
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/java8/org/apache/ignite/examples/MessagingExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java8/org/apache/ignite/examples/MessagingExample.java b/examples/src/main/java8/org/apache/ignite/examples/MessagingExample.java
index c69c3ab..89fbdbe 100644
--- a/examples/src/main/java8/org/apache/ignite/examples/MessagingExample.java
+++ b/examples/src/main/java8/org/apache/ignite/examples/MessagingExample.java
@@ -33,7 +33,7 @@ import java.util.concurrent.*;
* Remote nodes should always be started with special configuration file which
* enables P2P class loading: {@code 'ignite.{sh|bat} examples/config/example-compute.xml'}.
* <p>
- * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start GridGain node
+ * Alternatively you can run {@link ComputeNodeStartup} in another JVM which will start node
* with {@code examples/config/example-compute.xml} configuration.
*/
public final class MessagingExample {
@@ -50,8 +50,8 @@ public final class MessagingExample {
* @throws IgniteCheckedException If example execution failed.
*/
public static void main(String[] args) throws Exception {
- try (Ignite g = Ignition.start("examples/config/example-compute.xml")) {
- if (g.nodes().size() < 2) {
+ try (Ignite ignite = Ignition.start("examples/config/example-compute.xml")) {
+ if (ignite.nodes().size() < 2) {
System.out.println();
System.out.println(">>> Please start at least 2 grid nodes to run example.");
System.out.println();
@@ -63,7 +63,7 @@ public final class MessagingExample {
System.out.println(">>> Messaging example started.");
// Projection for remote nodes.
- ClusterGroup rmtPrj = g.forRemotes();
+ ClusterGroup rmtPrj = ignite.forRemotes();
// Listen for messages from remote nodes to make sure that they received all the messages.
int msgCnt = rmtPrj.nodes().size() * MESSAGES_NUM;
@@ -71,7 +71,7 @@ public final class MessagingExample {
CountDownLatch orderedLatch = new CountDownLatch(msgCnt);
CountDownLatch unorderedLatch = new CountDownLatch(msgCnt);
- localListen(g.forLocal(), orderedLatch, unorderedLatch);
+ localListen(ignite.forLocal(), orderedLatch, unorderedLatch);
// Register listeners on all grid nodes.
startListening(rmtPrj);
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample1.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample1.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample1.scala
index b0ca960..c9b0539 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample1.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheAffinityExample1.scala
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable
import java.util.concurrent.Callable
/**
- * Example of how to collocate computations and data in GridGain using
+ * Example of how to collocate computations and data in Ignite using
* `CacheAffinityKeyMapped` annotation as opposed to direct API calls. This
* example will first populate cache on some node where cache is available, and then
* will send jobs to the nodes where keys reside and print out values for those
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala
index e52f431..0605a8c 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCachePopularNumbersExample.scala
@@ -33,7 +33,7 @@ import scala.util.Random
* enables P2P class loading: `ignite.sh examples/config/example-cache.xml`
* <p>
* Alternatively you can run [[CacheNodeStartup]] in another JVM which will
- * start GridGain node with `examples/config/example-cache.xml` configuration.
+ * start node with `examples/config/example-cache.xml` configuration.
* <p>
* The counts are kept in cache on all remote nodes. Top `10` counts from each node are then grabbed to produce
* an overall top `10` list within the grid.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
index d189e9f..61347c3 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarCacheQueryExample.scala
@@ -76,12 +76,12 @@ object ScalarCacheQueryExample {
// Example for SQL-based querying with custom remote transformer to make sure
// that only required data without any overhead is returned to caller.
- // Gets last names of all 'GridGain' employees.
- print("Last names of all 'GridGain' employees: ",
+ // Gets last names of all 'Ignite' employees.
+ print("Last names of all 'Ignite' employees: ",
cache.sqlTransform(
prj,
"from Person, Organization where Person.orgId = Organization.id " +
- "and Organization.name = 'GridGain'",
+ "and Organization.name = 'Ignite'",
(p: Person) => p.lastName
).map(_._2)
)
@@ -120,7 +120,7 @@ object ScalarCacheQueryExample {
val orgCache = mkCache[UUID, Organization]
// Organizations.
- val org1 = Organization("GridGain")
+ val org1 = Organization("Ignite")
val org2 = Organization("Other")
orgCache += (org1.id -> org1)
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarJvmCloudExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarJvmCloudExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarJvmCloudExample.scala
index d1d4b12..e2ddd67 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarJvmCloudExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarJvmCloudExample.scala
@@ -80,11 +80,11 @@ object ScalarJvmCloudExample {
JOptionPane.showMessageDialog(
null,
Array[JComponent](
- new JLabel("GridGain JVM cloud started."),
+ new JLabel("Ignite JVM cloud started."),
new JLabel("Number of nodes in the grid: " + scalar.grid$(NODES(1)).get.cluster().nodes().size()),
new JLabel("Click OK to stop.")
),
- "GridGain",
+ "Ignite",
JOptionPane.INFORMATION_MESSAGE)
}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a234cdda/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala
----------------------------------------------------------------------
diff --git a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala
index ec42a40..87317d0 100644
--- a/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala
+++ b/examples/src/main/scala/org/apache/ignite/scalar/examples/ScalarSnowflakeSchemaExample.scala
@@ -33,7 +33,7 @@ import scala.collection.JavaConversions._
* <i>Dimensions</i> can be referenced or joined by other <i>dimensions</i> or <i>facts</i>,
* however, <i>facts</i> are generally not referenced by other facts. You can view <i>dimensions</i>
* as your master or reference data, while <i>facts</i> are usually large data sets of events or
- * other objects that continuously come into the system and may change frequently. In GridGain
+ * other objects that continuously come into the system and may change frequently. In Ignite
* such architecture is supported via cross-cache queries. By storing <i>dimensions</i> in
* `CacheMode#REPLICATED REPLICATED` caches and <i>facts</i> in much larger
* `CacheMode#PARTITIONED PARTITIONED` caches you can freely execute distributed joins across