Gemfire JavaDocs_test
Package org.apache.geode.cache.client
Enum ClientRegionShortcut
- java.lang.Object
-
- java.lang.Enum<ClientRegionShortcut>
-
- org.apache.geode.cache.client.ClientRegionShortcut
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ClientRegionShortcut>
public enum ClientRegionShortcut extends java.lang.Enum<ClientRegionShortcut>
Each enum represents a predefinedRegionAttributes
in aClientCache
. These enum values can be used to create regions using aClientRegionFactory
obtained by callingClientCache.createClientRegionFactory(ClientRegionShortcut)
.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.
- Since:
- GemFire 6.5
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CACHING_PROXY
A CACHING_PROXY region has local state but can also send operations to a server.CACHING_PROXY_HEAP_LRU
A CACHING_PROXY_HEAP_LRU region has local state but can also send operations to a server.CACHING_PROXY_OVERFLOW
A CACHING_PROXY_OVERFLOW region has local state but can also send operations to a server.LOCAL
A LOCAL region only has local state and never sends operations to a server.LOCAL_HEAP_LRU
A LOCAL_HEAP_LRU region only has local state and never sends operations to a server.LOCAL_OVERFLOW
A LOCAL_OVERFLOW region only has local state and never sends operations to a server.LOCAL_PERSISTENT
A LOCAL_PERSISTENT region only has local state and never sends operations to a server 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 a server but it does write its state to disk and can recover that state when the region is created.PROXY
A PROXY region has no local state and forwards all operations to a server.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ClientRegionShortcut
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ClientRegionShortcut[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PROXY
public static final ClientRegionShortcut PROXY
A PROXY region has no local state and forwards all operations to a server. The actual RegionAttributes for a PROXY set theDataPolicy
toDataPolicy.EMPTY
.
-
CACHING_PROXY
public static final ClientRegionShortcut CACHING_PROXY
A CACHING_PROXY region has local state but can also send operations to a server. If the local state is not found then the operation is sent to the server and the local state is updated to contain the server result. The actual RegionAttributes for a CACHING_PROXY set theDataPolicy
toDataPolicy.NORMAL
.
-
CACHING_PROXY_HEAP_LRU
public static final ClientRegionShortcut CACHING_PROXY_HEAP_LRU
A CACHING_PROXY_HEAP_LRU region has local state but can also send operations to a server. If the local state is not found then the operation is sent to the server and the local state is updated to contain the server result. It will also destroy entries once it detects that the java vm is running low of memory. The actual RegionAttributes for a CACHING_PROXY_HEAP_LRU set theDataPolicy
toDataPolicy.NORMAL
. andEvictionAttributes
are set toEvictionAlgorithm.LRU_HEAP
withEvictionAction.LOCAL_DESTROY
.
-
CACHING_PROXY_OVERFLOW
public static final ClientRegionShortcut CACHING_PROXY_OVERFLOW
A CACHING_PROXY_OVERFLOW region has local state but can also send operations to a server. If the local state is not found then the operation is sent to the server and the local state is updated to contain the server result. It will also move the values of entries to disk once it detects that the java vm is running low of memory. The actual RegionAttributes for a CACHING_PROXY_OVERFLOW set theDataPolicy
toDataPolicy.NORMAL
. andEvictionAttributes
are set toEvictionAlgorithm.LRU_HEAP
withEvictionAction.OVERFLOW_TO_DISK
.
-
LOCAL
public static final ClientRegionShortcut LOCAL
A LOCAL region only has local state and never sends operations to a server. The actual RegionAttributes for a LOCAL region set theDataPolicy
toDataPolicy.NORMAL
.
-
LOCAL_PERSISTENT
public static final ClientRegionShortcut LOCAL_PERSISTENT
A LOCAL_PERSISTENT region only has local state and never sends operations to a server but it does write its state to disk and can recover that state when the region is created. The actual RegionAttributes for a LOCAL_PERSISTENT region set theDataPolicy
toDataPolicy.PERSISTENT_REPLICATE
.
-
LOCAL_HEAP_LRU
public static final ClientRegionShortcut LOCAL_HEAP_LRU
A LOCAL_HEAP_LRU region only has local state and never sends operations to a server. It will also destroy entries once it detects that the java vm is running low of memory. The actual RegionAttributes for a LOCAL_HEAP_LRU region set theDataPolicy
toDataPolicy.NORMAL
andEvictionAttributes
are set toEvictionAlgorithm.LRU_HEAP
withEvictionAction.LOCAL_DESTROY
.
-
LOCAL_OVERFLOW
public static final ClientRegionShortcut LOCAL_OVERFLOW
A LOCAL_OVERFLOW region only has local state and never sends operations to a server. It will also move the values of entries to disk once it detects that the java vm is running low of memory. The actual RegionAttributes for a LOCAL_OVERFLOW region set theDataPolicy
toDataPolicy.NORMAL
andEvictionAttributes
are set toEvictionAlgorithm.LRU_HEAP
withEvictionAction.OVERFLOW_TO_DISK
.
-
LOCAL_PERSISTENT_OVERFLOW
public static final ClientRegionShortcut LOCAL_PERSISTENT_OVERFLOW
A LOCAL_PERSISTENT_OVERFLOW region only has local state and never sends operations to a server but it does write its state to disk and can recover that state when the region is created. It will also remove the values of entries from memory once it detects that the java vm is running low of memory. The actual RegionAttributes for a LOCAL_PERSISTENT_OVERFLOW region set theDataPolicy
toDataPolicy.PERSISTENT_REPLICATE
andEvictionAttributes
are set toEvictionAlgorithm.LRU_HEAP
withEvictionAction.OVERFLOW_TO_DISK
.
-
-
Method Detail
-
values
public static ClientRegionShortcut[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ClientRegionShortcut c : ClientRegionShortcut.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ClientRegionShortcut valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-