public enum CacheMode extends Enum<CacheMode>
CacheConfiguration
and cannot be changed after cache has started.| Enum Constant and Description |
|---|
LOCAL
Deprecated.
Local caches confuse users. The users mostly need either replicated caches or simple hash maps.
Local caches don't provide usefulness expected by the users (like SQL join support). Also, behavior of local
caches can be trivially implemented by the users themselves. Hence the deprecation.
|
PARTITIONED
Specifies partitioned cache behaviour.
|
REPLICATED
Specifies fully replicated cache behavior.
|
| Modifier and Type | Method and Description |
|---|---|
static @Nullable CacheMode |
fromOrdinal(int ord)
Efficiently gets enumerated value from its ordinal.
|
static CacheMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CacheMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Deprecated public static final CacheMode LOCAL
Other than distribution, local caches still have all
the caching features, such as eviction, expiration, swapping,
querying, etc... This mode is very useful when caching read-only data
or data that automatically expires at a certain interval and
then automatically reloaded from persistence store.
public static final CacheMode REPLICATED
AffinityFunction
configuration.public static final CacheMode PARTITIONED
AffinityFunction
configuration.
Note that partitioned cache is always fronted by local
'near' cache which stores most recent data. You
can configure the size of near cache via NearCacheConfiguration.getNearEvictionPolicyFactory()
configuration property.
public static CacheMode[] values()
for (CacheMode c : CacheMode.values()) System.out.println(c);
public static CacheMode 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 CacheMode fromOrdinal(int ord)
ord - Ordinal value.null if ordinal out of range.
GridGain In-Memory Computing Platform : ver. 8.9.27 Release Date : November 26 2025