public enum GridCachePreloadMode extends Enum<GridCachePreloadMode>
NONE), distributed caches
will attempt to preload all necessary values from other grid nodes. This enumeration is used to configure
preloading via GridCacheConfiguration.getPreloadMode() configuration property. If not configured
explicitly, then GridCacheConfiguration.DFLT_PRELOAD_MODE is used.
Replicated caches will try to load the full set of cache entries from other nodes (or as defined by
pluggable GridCacheAffinityFunction), while partitioned caches will only load the entries for which
current node is primary or back up.
Note that preload mode only makes sense for GridCacheMode.REPLICATED and GridCacheMode.PARTITIONED
caches. Caches with GridCacheMode.LOCAL mode are local by definition and therefore cannot preload
any values from neighboring nodes.
| Enum Constant and Description |
|---|
ASYNC
Asynchronous preload mode.
|
NONE
In this mode no preloading 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 preload mode.
|
| Modifier and Type | Method and Description |
|---|---|
static GridCachePreloadMode |
fromOrdinal(int ord)
Efficiently gets enumerated value from its ordinal.
|
static GridCachePreloadMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GridCachePreloadMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GridCachePreloadMode SYNC
public static final GridCachePreloadMode ASYNC
public static final GridCachePreloadMode NONE
public static GridCachePreloadMode[] values()
for (GridCachePreloadMode c : GridCachePreloadMode.values()) System.out.println(c);
public static GridCachePreloadMode 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 GridCachePreloadMode fromOrdinal(int ord)
ord - Ordinal value.null if ordinal out of range.Copyright © 2014. All rights reserved.