public enum CacheMode extends Enum<CacheMode>
CacheConfiguration
and cannot be changed after cache has started.Enum Constant and Description |
---|
LOCAL
Specifies local-only cache behaviour.
|
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.
|
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.14 Release Date : November 5 2024