public enum CacheMode extends Enum<CacheMode>
CacheConfiguration
and cannot be changed after cache has started.Enum Constant and Description |
---|
LOCAL
Deprecated.
Use
REPLICATED or PARTITIONED modes instead.
Please, be aware this API will be removed in the next releases. |
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
REPLICATED
or PARTITIONED
modes instead.
Please, be aware this API will be removed in the next releases.
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.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.12.0 Release Date : January 10 2022