public enum GridCacheMode extends Enum<GridCacheMode>
GridCacheConfiguration
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 GridCacheMode |
fromOrdinal(int ord)
Efficiently gets enumerated value from its ordinal.
|
static GridCacheMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GridCacheMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GridCacheMode 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 GridCacheMode REPLICATED
GridCacheAffinityFunction
configuration.public static final GridCacheMode PARTITIONED
GridCacheAffinityFunction
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 GridCacheConfiguration.getNearEvictionPolicy()
configuration property.
public static GridCacheMode[] values()
for (GridCacheMode c : GridCacheMode.values()) System.out.println(c);
public static GridCacheMode 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 GridCacheMode fromOrdinal(int ord)
ord - Ordinal value.null if ordinal out of range.Copyright © 2014. All rights reserved.