public enum RegionShortcut extends Enum<RegionShortcut>
RegionAttributes
in a Cache
. These enum values
can be used to create regions using a RegionFactory
obtained by calling
Cache.createRegionFactory(RegionShortcut)
.
Another way to use predefined region attributes is in cache.xml by setting the refid attribute on a region element or region-attributes element to the string of each value.
Enum Constant and Description |
---|
LOCAL
A LOCAL region only has local state and never sends operations to others.
|
LOCAL_HEAP_LRU
A LOCAL_HEAP_LRU region only has local state and never sends operations to others.
|
LOCAL_OVERFLOW
A LOCAL_OVERFLOW region only has local state and never sends operations to others.
|
LOCAL_PERSISTENT
A LOCAL_PERSISTENT region only has local state and never sends operations to others but it does
write its state to disk and can recover that state when the region is created.
|
LOCAL_PERSISTENT_OVERFLOW
A LOCAL_PERSISTENT_OVERFLOW region only has local state and never sends operations to others
but it does write its state to disk and can recover that state when the region is created.
|
PARTITION
A PARTITION has local state that is partitioned across each peer member that created the
region.
|
PARTITION_HEAP_LRU
A PARTITION_HEAP_LRU has local state that is partitioned across each peer member that created
the region.
|
PARTITION_OVERFLOW
A PARTITION_OVERFLOW has local state that is partitioned across each peer member that created
the region.
|
PARTITION_PERSISTENT
A PARTITION_PERSISTENT has local state that is partitioned across each peer member that created
the region.
|
PARTITION_PERSISTENT_OVERFLOW
A PARTITION_PERSISTENT_OVERFLOW has local state that is partitioned across each peer member
that created the region.
|
PARTITION_PROXY
A PARTITION_PROXY has no local state and forwards all operations to a PARTITION or a
PARTITION_PERSISTENT that exists in its peers.
|
PARTITION_PROXY_REDUNDANT
A PARTITION_PROXY_REDUNDANT has no local state and forwards all operations to a
PARTITION_REDUNDANT or a PARTITION_REDUNDANT_PERSISTENT that exists in its peers.
|
PARTITION_REDUNDANT
A PARTITION_REDUNDANT has local state that is partitioned across each peer member that created
the region.
|
PARTITION_REDUNDANT_HEAP_LRU
A PARTITION_REDUNDANT_HEAP_LRU has local state that is partitioned across each peer member that
created the region.
|
PARTITION_REDUNDANT_OVERFLOW
A PARTITION_REDUNDANT_OVERFLOW has local state that is partitioned across each peer member that
created the region.
|
PARTITION_REDUNDANT_PERSISTENT
A PARTITION_REDUNDANT_PERSISTENT has local state that is partitioned across each peer member
that created the region.
|
PARTITION_REDUNDANT_PERSISTENT_OVERFLOW
A PARTITION_REDUNDANT_PERSISTENT_OVERFLOW has local state that is partitioned across each peer
member that created the region.
|
REPLICATE
A REPLICATE has local state that is kept in sync with all other replicate regions that exist in
its peers.
|
REPLICATE_HEAP_LRU
A REPLICATE_HEAP_LRU has local state that is kept in sync with all other replicate regions that
exist in its peers.
|
REPLICATE_OVERFLOW
A REPLICATE_OVERFLOW has local state that is kept in sync with all other replicate regions that
exist in its peers.
|
REPLICATE_PERSISTENT
A REPLICATE_PERSISTENT has local state that is kept in sync with all other replicate regions
that exist in its peers.
|
REPLICATE_PERSISTENT_OVERFLOW
A REPLICATE_PERSISTENT_OVERFLOW has local state that is kept in sync with all other replicate
regions that exist in its peers.
|
REPLICATE_PROXY
A REPLICATE_PROXY has no local state and forwards all operations (except queries) to a
REPLICATE or a REPLICATE_PERSISTENT that exists in its peers.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isLocal() |
boolean |
isOverflow() |
boolean |
isPartition() |
boolean |
isPersistent() |
boolean |
isProxy() |
boolean |
isReplicate() |
static RegionShortcut |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RegionShortcut[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RegionShortcut PARTITION
DataPolicy
to
DataPolicy.PARTITION
.public static final RegionShortcut PARTITION_REDUNDANT
DataPolicy
to
DataPolicy.PARTITION
and the redundant-copies to 1.public static final RegionShortcut PARTITION_PERSISTENT
DataPolicy
to DataPolicy.PERSISTENT_PARTITION
.public static final RegionShortcut PARTITION_REDUNDANT_PERSISTENT
DataPolicy
to
DataPolicy.PERSISTENT_PARTITION
and the redundant-copies to 1.public static final RegionShortcut PARTITION_OVERFLOW
DataPolicy
to DataPolicy.PARTITION
. and EvictionAttributes
are set to
EvictionAlgorithm.LRU_HEAP
with EvictionAction.OVERFLOW_TO_DISK
.public static final RegionShortcut PARTITION_REDUNDANT_OVERFLOW
DataPolicy
to
DataPolicy.PARTITION
, the redundant-copies to 1, and EvictionAttributes
are set
to EvictionAlgorithm.LRU_HEAP
with EvictionAction.OVERFLOW_TO_DISK
.public static final RegionShortcut PARTITION_PERSISTENT_OVERFLOW
DataPolicy
to
DataPolicy.PERSISTENT_PARTITION
and EvictionAttributes
are set to
EvictionAlgorithm.LRU_HEAP
with EvictionAction.OVERFLOW_TO_DISK
.public static final RegionShortcut PARTITION_REDUNDANT_PERSISTENT_OVERFLOW
DataPolicy
to DataPolicy.PERSISTENT_PARTITION
, the redundant-copies to
1, and EvictionAttributes
are set to EvictionAlgorithm.LRU_HEAP
with
EvictionAction.OVERFLOW_TO_DISK
.public static final RegionShortcut PARTITION_HEAP_LRU
DataPolicy
to DataPolicy.PARTITION
and EvictionAttributes
are set to
EvictionAlgorithm.LRU_HEAP
with EvictionAction.LOCAL_DESTROY
.public static final RegionShortcut PARTITION_REDUNDANT_HEAP_LRU
DataPolicy
to
DataPolicy.PARTITION
, the redundant-copies to 1, and EvictionAttributes
are set
to EvictionAlgorithm.LRU_HEAP
with EvictionAction.LOCAL_DESTROY
.public static final RegionShortcut REPLICATE
DataPolicy
to
DataPolicy.REPLICATE
and Scope
to Scope.DISTRIBUTED_ACK
.public static final RegionShortcut REPLICATE_PERSISTENT
DataPolicy
to DataPolicy.PERSISTENT_REPLICATE
and Scope
to
Scope.DISTRIBUTED_ACK
.public static final RegionShortcut REPLICATE_OVERFLOW
DataPolicy
to DataPolicy.REPLICATE
, the Scope
to
Scope.DISTRIBUTED_ACK
and EvictionAttributes
are set to
EvictionAlgorithm.LRU_HEAP
with EvictionAction.OVERFLOW_TO_DISK
.public static final RegionShortcut REPLICATE_PERSISTENT_OVERFLOW
DataPolicy
to
DataPolicy.PERSISTENT_REPLICATE
, the Scope
to Scope.DISTRIBUTED_ACK
,
and EvictionAttributes
are set to EvictionAlgorithm.LRU_HEAP
with
EvictionAction.OVERFLOW_TO_DISK
.public static final RegionShortcut REPLICATE_HEAP_LRU
DataPolicy
to DataPolicy.PRELOADED
, the Scope
to
Scope.DISTRIBUTED_ACK
, SubscriptionAttributes
to InterestPolicy.ALL
,
and EvictionAttributes
are set to EvictionAlgorithm.LRU_HEAP
with
EvictionAction.LOCAL_DESTROY
.public static final RegionShortcut LOCAL
Scope
to Scope.LOCAL
and the DataPolicy
to DataPolicy.NORMAL
.public static final RegionShortcut LOCAL_PERSISTENT
Scope
to Scope.LOCAL
and the DataPolicy
to DataPolicy.PERSISTENT_REPLICATE
.public static final RegionShortcut LOCAL_HEAP_LRU
Scope
to Scope.LOCAL
,
the DataPolicy
to DataPolicy.NORMAL
, and EvictionAttributes
are set to
EvictionAlgorithm.LRU_HEAP
with EvictionAction.LOCAL_DESTROY
.public static final RegionShortcut LOCAL_OVERFLOW
Scope
to Scope.LOCAL
,
the DataPolicy
to DataPolicy.NORMAL
, and EvictionAttributes
are set to
EvictionAlgorithm.LRU_HEAP
with EvictionAction.OVERFLOW_TO_DISK
.public static final RegionShortcut LOCAL_PERSISTENT_OVERFLOW
Scope
to Scope.LOCAL
, the
DataPolicy
to DataPolicy.PERSISTENT_REPLICATE
, and EvictionAttributes
are set to EvictionAlgorithm.LRU_HEAP
with EvictionAction.OVERFLOW_TO_DISK
.public static final RegionShortcut PARTITION_PROXY
DataPolicy
to DataPolicy.PARTITION
and the
local-max-memory to 0.public static final RegionShortcut PARTITION_PROXY_REDUNDANT
DataPolicy
to
DataPolicy.PARTITION
, the local-max-memory to 0, and the redundant-copies to 1.public static final RegionShortcut REPLICATE_PROXY
DataPolicy
to DataPolicy.EMPTY
and Scope
to
Scope.DISTRIBUTED_ACK
.public static RegionShortcut[] values()
for (RegionShortcut c : RegionShortcut.values()) System.out.println(c);
public static RegionShortcut 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 nullpublic boolean isProxy()
public boolean isLocal()
public boolean isPartition()
public boolean isReplicate()
public boolean isPersistent()
public boolean isOverflow()