|
GridGain 3.6.0e
Enterprise Edition |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GridRichNode
Defines a "rich" node as a single node-based grid projection.
All main grid entities such as grid, projection and a node instances can be viewed as
collection of grid nodes (in case of the grid node this collection consist of only one
element). As such they all share the same set of operations that can be performed on a set
grid nodes. These operations are defined in GridProjection interface and called
monadic as they are equally defined on any arbitrary set of nodes.
null values is Java's way to support such monadic invocations.
All methods that accept null values (for monadic purposes) will gracefully handle it by
either returning a finished future, or empty collection, null value, or combination of the
above. Most method calls therefore can be chained without an explicit checks for nulls.
The downside of this approach that inadvertent errors of passing null will not result
in NullPointerException and may be harder to catch.
| Wiki | |
| Forum |
![]() |
![]() |
![]() |
![]() |
| Method Summary | ||
|---|---|---|
|
call(Callable<R> job)
Convenient shortcut that executes given closure on this node. |
|
|
call(Collection<? extends Callable<R>> jobs)
Convenient shortcut that executes given closures on this node. |
|
|
callAsync(Callable<R> job)
Convenient shortcut that asynchronously executes given closure on this node. |
|
|
callAsync(Collection<? extends Callable<R>> jobs)
Convenient shortcut that asynchronously executes given closures on this node. |
|
|
forkjoin(Collection<? extends Callable<R1>> jobs,
GridReducer<R1,R2> rdc)
Convenient shortcut that executes given jobs on this node and reduces their results. |
|
|
forkjoinAsync(Collection<? extends Callable<R1>> jobs,
GridReducer<R1,R2> rdc)
Convenient shortcut that asynchronously executes given jobs on this node. |
|
String |
gridName()
Gets name of the grid this node belongs to. |
|
String |
id8()
Gets first 8 characters from node ID. |
|
boolean |
isDaemon()
Tests whether or not this node is a daemon. |
|
boolean |
isLocal()
Tests whether or not this node is a local node. |
|
GridProjection |
neighbors()
Gets the projection on all nodes that reside on the same physical computer as this node. |
|
GridProjection |
neighborsAndMe()
Gets the projection on all nodes that reside on the same physical computer as this node. |
|
|
nodeLocalCall(Object key,
GridClosure<Object,T> c)
Runs given closure on this node using value from node local storage of this node. |
|
|
nodeLocalCallAsync(Object key,
GridClosure<Object,T> c)
Runs given closure on this node using value from node local storage of this node. |
|
|
nodeLocalGet(Object key)
Gets node local value from this node with given key. |
|
|
nodeLocalGetAsync(Object key)
Gets node local value from this node with given key. |
|
|
nodeLocalPut(Object key,
Object val)
Puts value into node local storage of this node. |
|
|
nodeLocalPutAsync(Object key,
Object val)
Puts value into node local storage of this node. |
|
void |
nodeLocalRun(Object key,
GridInClosure<Object> c)
Runs given closure on this node using value from node local storage of this node. |
|
GridFuture<?> |
nodeLocalRunAsync(Object key,
GridInClosure<Object> c)
Runs given closure on this node using value from node local storage of this node. |
|
GridNode |
originalNode()
Gets the original grid node wrapped by this rich interface. |
|
GridProjection |
others(GridPredicate<? super GridRichNode>... p)
Gets projection of all other nodes in the grid excluding this node. |
|
boolean |
ping()
Pings this node. |
|
void |
run(Collection<? extends Runnable> jobs)
Convenient shortcut that executes given closures on this node. |
|
void |
run(Runnable job)
Convenient shortcut that executes given closure on this node. |
|
GridFuture<?> |
runAsync(Collection<? extends Runnable> jobs)
Convenient shortcut that asynchronously executes given closures on this node. |
|
GridFuture<?> |
runAsync(Runnable job)
Convenient shortcut that asynchronously executes given closure on this node. |
|
| Methods inherited from interface org.gridgain.grid.GridNode |
|---|
attribute, attributes, externalAddresses, id, internalAddresses, metrics, order |
| Methods inherited from interface org.gridgain.grid.GridMetadataAware |
|---|
addMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, removeMeta, removeMeta, replaceMeta |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Methods inherited from interface org.gridgain.grid.lang.GridTypedProduct |
|---|
arity, part |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Method Detail |
|---|
GridProjection neighbors()
Detection of the same physical computer is based on comparing set of network interface MACs. If two nodes have the same set of MACs, GridGain considers these nodes running on the same physical computer. Note that this same logic is used in license management.
Knowing your neighbors can be very important when performing a dynamic split since nodes on the same computer will often bypass network when communicating with each other leading to much better performance for certain use cases. Conversely, one would like to avoid loading the nodes from the same physical computer with tasks as these nodes share CPU and memory between them resulting in reduced performance comparing to a no-neighboring split.
null but may return an
empty projection.GridProjection.neighborhood(),
GridRichNode.neighborsAndMe()GridProjection neighborsAndMe()
Detection of the same physical computer is based on comparing set of network interface MACs. If two nodes have the same set of MACs, GridGain considers these nodes running on the same physical computer. Note that this same logic is used in license management.
Knowing your neighbors can be very important when performing a dynamic split since nodes on the same computer will often bypass network when communicating with each other leading to much better performance for certain use cases. Conversely, one would like to avoid loading the nodes from the same physical computer with tasks as these nodes share CPU and memory between them resulting in reduced performance comparing to a no-neighboring split.
null or an
empty projection.GridProjection.neighborhood(),
GridRichNode.neighbors()
GridProjection others(@Nullable
GridPredicate<? super GridRichNode>... p)
p - Optional filtering predicate. Only nodes that evaluate to true
or all given predicate will be included into resulting projection.
null but returns an empty projection when this is the only node in
the topology.GridNode originalNode()
boolean isLocal()
True if this node is a local node, false otherwise.boolean isDaemon()
Daemon nodes are the usual grid nodes that participate in topology but not
visible on the main APIs, i.e. they are not part of any projections. The only
way to see daemon nodes is to use GridProjection.daemonNodes(GridPredicate[]) method.
Daemon nodes are used primarily for management and monitoring functionality that is build on GridGain and needs to participate in the topology but should be excluded from "normal" topology so that it won't participate in task execution or data grid.
Application code should never use daemon nodes.
True if this node is a daemon, false otherwise.@Nullable String gridName()
null name.boolean ping()
Discovery SPIs usually have some latency in discovering failed nodes. Hence, communication to remote nodes may fail at times if an attempt was made to establish communication with a failed node. This method can be used to check if communication has failed due to node failure or due to some other reason.
true if node for a given ID is alive, false otherwise.Grid.pingNode(UUID)String id8()
<R> GridFuture<R> callAsync(@Nullable Callable<R> job) throws GridException
Unlike its sibling method GridRichNode.call(Callable) this method does
not block and returns immediately with future. All default SPI implementations
configured for this grid instance will be used (i.e. failover, load balancing, collision resolution, etc.).
Note that if you need greater control on any aspects of Java code execution on the grid
you should implement GridTask which will provide you with full control over the execution.
Note that class GridAbsClosure implements Runnable and class GridOutClosure
implements Callable interface. Note also that class GridFunc and typedefs provide rich
APIs and functionality for closures and predicates based processing in GridGain. While Java interfaces
Runnable and Callable allow for lowest common denominator for APIs - it is advisable
to use richer Functional Programming support provided by GridGain available in org.gridgain.grid.lang
package.
Notice that Runnable and Callable implementations must support serialization as required
by the configured marshaller. For example, JDK marshaller will require that implementations would
be serializable. Other marshallers, e.g. JBoss marshaller, may not have this limitation. Please consult
with specific marshaller implementation for the details. Note that all closures and predicates in
org.gridgain.grid.lang package are serializable and can be freely used in the distributed
context with all marshallers currently shipped with GridGain.
GridException - Thrown in case of any error.R - Type of the closure return value.job - Closure to invoke. If null - this method is no-op.
PN,
GridProjection.call(GridClosureCallMode, Callable, GridPredicate[])<R> GridFuture<Collection<R>> callAsync(@Nullable Collection<? extends Callable<R>> jobs) throws GridException
Unlike its sibling method GridRichNode.call(Collection) this method does
not block and returns immediately with future. All default SPI implementations
configured for this grid instance will be used (i.e. failover, load balancing, collision resolution, etc.).
Note that if you need greater control on any aspects of Java code execution on the grid
you should implement GridTask which will provide you with full control over the execution.
Note that class GridAbsClosure implements Runnable and class GridOutClosure
implements Callable interface. Note also that class GridFunc and typedefs provide rich
APIs and functionality for closures and predicates based processing in GridGain. While Java interfaces
Runnable and Callable allow for lowest common denominator for APIs - it is advisable
to use richer Functional Programming support provided by GridGain available in org.gridgain.grid.lang
package.
Notice that Runnable and Callable implementations must support serialization as required
by the configured marshaller. For example, JDK marshaller will require that implementations would
be serializable. Other marshallers, e.g. JBoss marshaller, may not have this limitation. Please consult
with specific marshaller implementation for the details. Note that all closures and predicates in
org.gridgain.grid.lang package are serializable and can be freely used in the distributed
context with all marshallers currently shipped with GridGain.
GridException - Thrown in case of any error.R - Type of the closure return value.jobs - Closures to invoke. If null or empty - this method is no-op.
PN<R1,R2> GridFuture<R2> forkjoinAsync(@Nullable Collection<? extends Callable<R1>> jobs, @Nullable GridReducer<R1,R2> rdc) throws GridException
Unlike its sibling method GridRichNode.forkjoin(Collection, GridReducer)
this method does not block and returns immediately with future. All default SPI implementations
configured for this grid instance will be used (i.e. failover, load balancing, collision resolution, etc.).
Note that if you need greater control on any aspects of Java code execution on the grid
you should implement GridTask which will provide you with full control over the execution.
Note that class GridAbsClosure implements Runnable and class GridOutClosure
implements Callable interface. Note also that class GridFunc and typedefs provide rich
APIs and functionality for closures and predicates based processing in GridGain. While Java interfaces
Runnable and Callable allow for lowest common denominator for APIs - it is advisable
to use richer Functional Programming support provided by GridGain available in org.gridgain.grid.lang
package.
Notice that Runnable and Callable implementations must support serialization as required
by the configured marshaller. For example, JDK marshaller will require that implementations would
be serializable. Other marshallers, e.g. JBoss marshaller, may not have this limitation. Please consult
with specific marshaller implementation for the details. Note that all closures and predicates in
org.gridgain.grid.lang package are serializable and can be freely used in the distributed
context with all marshallers currently shipped with GridGain.
GridException - Thrown in case of any error.R1 - Closure result type.R2 - Type of the reduced value.jobs - Closures to executes. If null or empty - this method is no-op.rdc - Result reducing closure If null - this method is no-op.
PNGridFuture<?> runAsync(@Nullable Runnable job) throws GridException
Unlike its sibling method GridRichNode.run(Runnable) this method does
not block and returns immediately with future. All default SPI implementations
configured for this grid instance will be used (i.e. failover, load balancing, collision resolution, etc.).
Note that if you need greater control on any aspects of Java code execution on the grid
you should implement GridTask which will provide you with full control over the execution.
Note that class GridAbsClosure implements Runnable and class GridOutClosure
implements Callable interface. Note also that class GridFunc and typedefs provide rich
APIs and functionality for closures and predicates based processing in GridGain. While Java interfaces
Runnable and Callable allow for lowest common denominator for APIs - it is advisable
to use richer Functional Programming support provided by GridGain available in org.gridgain.grid.lang
package.
Notice that Runnable and Callable implementations must support serialization as required
by the configured marshaller. For example, JDK marshaller will require that implementations would
be serializable. Other marshallers, e.g. JBoss marshaller, may not have this limitation. Please consult
with specific marshaller implementation for the details. Note that all closures and predicates in
org.gridgain.grid.lang package are serializable and can be freely used in the distributed
context with all marshallers currently shipped with GridGain.
GridException - Thrown in case of any error.job - Job closure to execute. If null - this method is no-op.
PN,
GridProjection.run(GridClosureCallMode, Runnable, GridPredicate[])GridFuture<?> runAsync(@Nullable Collection<? extends Runnable> jobs) throws GridException
Unlike its sibling method GridRichNode.run(Collection) this method does
not block and returns immediately with future. All default SPI implementations
configured for this grid instance will be used (i.e. failover, load balancing, collision resolution, etc.).
Note that if you need greater control on any aspects of Java code execution on the grid
you should implement GridTask which will provide you with full control over the execution.
Note that class GridAbsClosure implements Runnable and class GridOutClosure
implements Callable interface. Note also that class GridFunc and typedefs provide rich
APIs and functionality for closures and predicates based processing in GridGain. While Java interfaces
Runnable and Callable allow for lowest common denominator for APIs - it is advisable
to use richer Functional Programming support provided by GridGain available in org.gridgain.grid.lang
package.
Notice that Runnable and Callable implementations must support serialization as required
by the configured marshaller. For example, JDK marshaller will require that implementations would
be serializable. Other marshallers, e.g. JBoss marshaller, may not have this limitation. Please consult
with specific marshaller implementation for the details. Note that all closures and predicates in
org.gridgain.grid.lang package are serializable and can be freely used in the distributed
context with all marshallers currently shipped with GridGain.
GridException - Thrown in case of any error.jobs - Job closures to execute. If null or empty - this method is no-op.
PN,
GridProjection.run(GridClosureCallMode, Collection, GridPredicate[])
void run(@Nullable
Runnable job)
throws GridException
GridProjection.run(GridClosureCallMode, Runnable, GridPredicate[]).
This method will block until the execution is complete. All default SPI implementations
configured for this grid instance will be used (i.e. failover, load balancing, collision resolution, etc.).
Note that if you need greater control on any aspects of Java code execution on the grid
you should implement GridTask which will provide you with full control over the execution.
Here's a general example of the Java method that takes a text message, splits it into individual words and prints each word on an individual grid node using typedefs, functional APIs and closure execution on the grid:
public static void sayIt(String phrase) throws GridException {
G.grid().call(SPREAD, F.yield(phrase.split(" "), F.<String>printf("%s")));
}
Note that class GridAbsClosure implements Runnable and class GridOutClosure
implements Callable interface. Note also that class GridFunc and typedefs provide rich
APIs and functionality for closures and predicates based processing in GridGain. While Java interfaces
Runnable and Callable allow for lowest common denominator for APIs - it is advisable
to use richer Functional Programming support provided by GridGain available in org.gridgain.grid.lang
package.
Notice that Runnable and Callable implementations must support serialization as required
by the configured marshaller. For example, JDK marshaller will require that implementations would
be serializable. Other marshallers, e.g. JBoss marshaller, may not have this limitation. Please consult
with specific marshaller implementation for the details. Note that all closures and predicates in
org.gridgain.grid.lang package are serializable and can be freely used in the distributed
context with all marshallers currently shipped with GridGain.
GridException - Thrown in case of any error.
GridInterruptedException - Subclass of GridException thrown if the wait was interrupted.
GridFutureCancelledException - Subclass of GridException throws if computation was cancelled.job - Job closure to execute. If null - this method is no-op.
void run(@Nullable
Collection<? extends Runnable> jobs)
throws GridException
GridProjection.run(GridClosureCallMode, Collection, GridPredicate[]).
This method will block until the execution is complete. All default SPI implementations
configured for this grid instance will be used (i.e. failover, load balancing, collision resolution, etc.).
Note that if you need greater control on any aspects of Java code execution on the grid
you should implement GridTask which will provide you with full control over the execution.
Here's a general example of the Java method that takes a text message, splits it into individual words and prints each word on an individual grid node using typedefs, functional APIs and closure execution on the grid:
public static void sayIt(String phrase) throws GridException {
G.grid().call(SPREAD, F.yield(phrase.split(" "), F.<String>printf("%s")));
}
Note that class GridAbsClosure implements Runnable and class GridOutClosure
implements Callable interface. Note also that class GridFunc and typedefs provide rich
APIs and functionality for closures and predicates based processing in GridGain. While Java interfaces
Runnable and Callable allow for lowest common denominator for APIs - it is advisable
to use richer Functional Programming support provided by GridGain available in org.gridgain.grid.lang
package.
Notice that Runnable and Callable implementations must support serialization as required
by the configured marshaller. For example, JDK marshaller will require that implementations would
be serializable. Other marshallers, e.g. JBoss marshaller, may not have this limitation. Please consult
with specific marshaller implementation for the details. Note that all closures and predicates in
org.gridgain.grid.lang package are serializable and can be freely used in the distributed
context with all marshallers currently shipped with GridGain.
GridException - Thrown in case of any error.
GridInterruptedException - Subclass of GridException thrown if the wait was interrupted.
GridFutureCancelledException - Subclass of GridException throws if computation was cancelled.jobs - Job closures to execute. If null or empty - this method is no-op.<R> R call(@Nullable Callable<R> job) throws GridException
GridProjection.call(GridClosureCallMode, Callable, org.gridgain.grid.lang.GridPredicate[]).
This method will block until the execution is complete. All default SPI implementations
configured for this grid instance will be used (i.e. failover, load balancing, collision
resolution, etc.).
Note that if you need greater control on any aspects of Java code execution on the grid
you should implement GridTask which will provide you with full control over the execution.
Here's a general example of the Java method that takes a text message, splits it into individual words and prints each word on an individual grid node using typedefs, functional APIs and closure execution on the grid:
public static void sayIt(String phrase) throws GridException {
G.grid().call(SPREAD, F.yield(phrase.split(" "), F.<String>printf("%s")));
}
Note that class GridAbsClosure implements Runnable and class GridOutClosure
implements Callable interface. Note also that class GridFunc and typedefs provide rich
APIs and functionality for closures and predicates based processing in GridGain. While Java interfaces
Runnable and Callable allow for lowest common denominator for APIs - it is advisable
to use richer Functional Programming support provided by GridGain available in org.gridgain.grid.lang
package.
Notice that Runnable and Callable implementations must support serialization as required
by the configured marshaller. For example, JDK marshaller will require that implementations would
be serializable. Other marshallers, e.g. JBoss marshaller, may not have this limitation. Please consult
with specific marshaller implementation for the details. Note that all closures and predicates in
org.gridgain.grid.lang package are serializable and can be freely used in the distributed
context with all marshallers currently shipped with GridGain.
GridException - Thrown in case of any error.
GridInterruptedException - Subclass of GridException thrown if the wait was interrupted.
GridFutureCancelledException - Subclass of GridException throws if computation was cancelled.R - Type of the closure return value.job - Closure to invoke. If null - this method is no-op.
<R> Collection<R> call(@Nullable Collection<? extends Callable<R>> jobs) throws GridException
GridProjection.call(GridClosureCallMode, Collection, GridPredicate[])
This method will block until the execution is complete. All default SPI implementations
configured for this grid instance will be used (i.e. failover, load balancing, collision
resolution, etc.).
Note that if you need greater control on any aspects of Java code execution on the grid
you should implement GridTask which will provide you with full control over the execution.
Here's a general example of the Java method that takes a text message, splits it into individual words and prints each word on an individual grid node using typedefs, functional APIs and closure execution on the grid:
public static void sayIt(String phrase) throws GridException {
G.grid().call(SPREAD, F.yield(phrase.split(" "), F.<String>printf("%s")));
}
Note that class GridAbsClosure implements Runnable and class GridOutClosure
implements Callable interface. Note also that class GridFunc and typedefs provide rich
APIs and functionality for closures and predicates based processing in GridGain. While Java interfaces
Runnable and Callable allow for lowest common denominator for APIs - it is advisable
to use richer Functional Programming support provided by GridGain available in org.gridgain.grid.lang
package.
Notice that Runnable and Callable implementations must support serialization as required
by the configured marshaller. For example, JDK marshaller will require that implementations would
be serializable. Other marshallers, e.g. JBoss marshaller, may not have this limitation. Please consult
with specific marshaller implementation for the details. Note that all closures and predicates in
org.gridgain.grid.lang package are serializable and can be freely used in the distributed
context with all marshallers currently shipped with GridGain.
GridException - Thrown in case of any error.
GridInterruptedException - Subclass of GridException thrown if the wait was interrupted.
GridFutureCancelledException - Subclass of GridException throws if computation was cancelled.R - Type of the closure return value.jobs - Closures to invoke. If null or empty - this method is no-op.
<R1,R2> R2 forkjoin(@Nullable Collection<? extends Callable<R1>> jobs, @Nullable GridReducer<R1,R2> rdc) throws GridException
GridProjection.reduce(GridClosureCallMode, Collection, GridReducer, GridPredicate[]).
This method will block until its execution is complete or an exception is thrown.
All default SPI implementations configured for this grid instance will be
used (i.e. failover, load balancing, collision resolution, etc.).
Note that if you need greater control on any aspects of Java code execution on the grid
you should implement GridTask which will provide you with full control over the execution.
Here's a general example of the Java method that takes a text message and calculates its length by splitting it by spaces, calculating the length of each word on individual (remote) grid node and then summing (reducing) results from all nodes to produce the final length of the input string using function APIs, typedefs, and execution closures on the grid:
public static int length(final String msg) throws GridException {
return G.grid().reduce(SPREAD,
F.yield(
msg.split(" "),
new C1<String, Integer>() {
@Override public Integer apply(String e) { return e.length(); }
}
),
new R1<Integer, Integer>() {
private int len = 0;
@Override public void apply(Integer e) { len += e + 1; }
@Override public Integer reduce() { return len - 1; }
}
);
}
Note that class GridAbsClosure implements Runnable and class GridOutClosure
implements Callable interface. Note also that class GridFunc and typedefs provide rich
APIs and functionality for closures and predicates based processing in GridGain. While Java interfaces
Runnable and Callable allow for lowest common denominator for APIs - it is advisable
to use richer Functional Programming support provided by GridGain available in org.gridgain.grid.lang
package.
Notice that Runnable and Callable implementations must support serialization as required
by the configured marshaller. For example, JDK marshaller will require that implementations would
be serializable. Other marshallers, e.g. JBoss marshaller, may not have this limitation. Please consult
with specific marshaller implementation for the details. Note that all closures and predicates in
org.gridgain.grid.lang package are serializable and can be freely used in the distributed
context with all marshallers currently shipped with GridGain.
GridException - Thrown in case of any error.
GridInterruptedException - Subclass of GridException thrown if the wait was interrupted.
GridFutureCancelledException - Subclass of GridException throws if computation was cancelled.R1 - Closure result type.R2 - Type of the reduced value.jobs - Closures to executes. If null or empty - this method is no-op.rdc - Result reducing closure. If null - this method is no-op.
<T> T nodeLocalGet(Object key) throws GridException
key must serializable as per current marshaller.
Note that for the local node this method will be optimized to avoid unnecessary distribution overhead and operation will be performed in a local context.
GridException - Thrown in case of any failure.
GridInterruptedException - Subclass of GridException thrown if the wait was interrupted.
GridFutureCancelledException - Subclass of GridException throws if computation was cancelled.T - Type of the value.key - Node local ket.
GridRichNode.nodeLocalGetAsync(Object)<T> GridFuture<T> nodeLocalGetAsync(Object key) throws GridException
GridRichNode.nodeLocalGet(Object)
this method will not block and will return immediately with future. Note also that key
must be serializable as per current marshaller.
Note that for the local node this method will be optimized to avoid unnecessary distribution overhead and operation will be performed in a local context.
GridException - Thrown in case of any failure.T - Type of the value.key - Node local ket.
GridRichNode.nodeLocalGet(Object)<T> T nodeLocalPut(Object key, @Nullable Object val) throws GridException
GridRichNode.nodeLocalPutAsync(Object, Object)
this method will block until operation is complete. Note also that key and
value must be serializable as per current marshaller.
Note that for the local node this method will be optimized to avoid unnecessary distribution overhead and operation will be performed in a local context.
GridException - Thrown in case of any failure.T - Type of the previous value, if any.key - Node local key.val - Node local value.
null.<T> GridFuture<T> nodeLocalPutAsync(Object key, @Nullable Object val) throws GridException
GridRichNode.nodeLocalPut(Object, Object)
this method will not block and will return with the future. Note also that key
and value must be serializable as per current marshaller.
Note that for the local node this method will be optimized to avoid unnecessary distribution overhead and operation will be performed in a local context.
GridException - Thrown in case of any failure.T - Type of the previous value, if any.key - Node local key.val - Node local value.
void nodeLocalRun(Object key,
@Nullable
GridInClosure<Object> c)
throws GridException
GridRichNode.nodeLocalRunAsync(Object, GridInClosure)
this method will block until operation is complete. Note also that key
must be serializable as per current marshaller.
Note that for the local node this method will be optimized to avoid unnecessary distribution overhead and operation will be performed in a local context.
GridException - Thrown in case of any failure.key - Node local key.c - Closure to run. If null - this method is no-op.GridRichNode.run(Runnable)GridFuture<?> nodeLocalRunAsync(Object key, @Nullable GridInClosure<Object> c) throws GridException
GridRichNode.nodeLocalRun(Object, GridInClosure)
this method will not block and will return with the future. Note also that key
must be serializable as per current marshaller.
Note that for the local node this method will be optimized to avoid unnecessary distribution overhead and operation will be performed in a local context.
GridException - Thrown in case of any failure.key - Node local key.c - Closure to run. If null - this method is no-op.
GridRichNode.runAsync(Runnable)<T> T nodeLocalCall(Object key, @Nullable GridClosure<Object,T> c) throws GridException
GridRichNode.nodeLocalCallAsync(Object, GridClosure)
this method will block until operation is complete. Note also that key
must be serializable as per current marshaller.
Note that for the local node this method will be optimized to avoid unnecessary distribution overhead and operation will be performed in a local context.
GridException - Thrown in case of any failure.T - Type of the closure return value.key - Node local key.c - Closure to run. If null - this method is no-op.
GridRichNode.call(Callable)<T> GridFuture<T> nodeLocalCallAsync(Object key, @Nullable GridClosure<Object,T> c) throws GridException
GridRichNode.nodeLocalCall(Object, GridClosure) this
method will not block and will return with the future. Note also that key
must be serializable as per current marshaller.
Note that for the local node this method will be optimized to avoid unnecessary distribution overhead and operation will be performed in a local context.
GridException - Thrown in case of any failure.T - Type of the closure return value.key - Node local key.c - Closure to run. If null - this method is no-op.
GridRichNode.callAsync(Callable)
|
GridGain 3.6.0e
Enterprise Edition |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
|
GridGain - Real Time Big Data
|
|
|