public enum GridClosureCallMode extends Enum<GridClosureCallMode>
Grid.call(...)
methods.
In other words, given a set of jobs (closures) and set of grid nodes this enumeration provides
three simple modes of how these jobs will be mapped to the nodes.
Note that if you need to provide custom distribution logic you need to
implement ComputeTask
interface that allows you to customize every aspect of a
distributed Java code execution such as mapping, load balancing, failover, collision
resolution, continuations, etc.
Enum Constant and Description |
---|
BALANCE
In this mode closures will be executed on the nodes provided by the default
load balancer.
|
BROADCAST
In this mode all closures will be executed on each node.
|
Modifier and Type | Method and Description |
---|---|
static GridClosureCallMode |
fromOrdinal(byte ord)
Efficiently gets enumerated value from its ordinal.
|
static GridClosureCallMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GridClosureCallMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GridClosureCallMode BROADCAST
public static final GridClosureCallMode BALANCE
NOTE: this mode must be used for all cache affinity routing. Load balance manager has specific logic to handle co-location between compute grid jobs and in-memory data grid data. All other modes will not work for affinity-based co-location.
public static GridClosureCallMode[] values()
for (GridClosureCallMode c : GridClosureCallMode.values()) System.out.println(c);
public static GridClosureCallMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@Nullable public static GridClosureCallMode fromOrdinal(byte ord)
ord
- Ordinal value.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.9.0 Release Date : March 2 2017