public enum CacheRebalanceMode extends Enum<CacheRebalanceMode>
NONE
), distributed caches
will attempt to rebalance all necessary values from other grid nodes. This enumeration is used to configure
rebalancing via CacheConfiguration.getRebalanceMode()
configuration property. If not configured
explicitly, then CacheConfiguration.DFLT_REBALANCE_MODE
is used.
Replicated caches will try to load the full set of cache entries from other nodes (or as defined by
pluggable AffinityFunction
), while partitioned caches will only load the entries for which
current node is primary or back up.
Note that rebalance mode only makes sense for CacheMode.REPLICATED
and CacheMode.PARTITIONED
caches. Caches with CacheMode.LOCAL
mode are local by definition and therefore cannot rebalance
any values from neighboring nodes.
Enum Constant and Description |
---|
ASYNC
Asynchronous rebalance mode.
|
NONE
In this mode no rebalancing will take place which means that caches will be either loaded on
demand from persistent store whenever data is accessed, or will be populated explicitly.
|
SYNC
Synchronous rebalance mode.
|
Modifier and Type | Method and Description |
---|---|
static @Nullable CacheRebalanceMode |
fromOrdinal(int ord)
Efficiently gets enumerated value from its ordinal.
|
static CacheRebalanceMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CacheRebalanceMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CacheRebalanceMode SYNC
public static final CacheRebalanceMode ASYNC
public static final CacheRebalanceMode NONE
public static CacheRebalanceMode[] values()
for (CacheRebalanceMode c : CacheRebalanceMode.values()) System.out.println(c);
public static CacheRebalanceMode 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 @Nullable CacheRebalanceMode fromOrdinal(int ord)
ord
- Ordinal value.null
if ordinal out of range.
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024