Package org.apache.geode.cache
Class ExpirationAction
java.lang.Object
org.apache.geode.cache.ExpirationAction
- All Implemented Interfaces:
Serializable
Enumerated type for expiration actions.
- Since:
- GemFire 3.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ExpirationActionWhen the region or cached object expires, it is destroyed.static final ExpirationActionWhen the region or cached object expires, it is invalidated.static final ExpirationActionWhen expired, destroyed locally only.static final ExpirationActionWhen expired, invalidated locally only.final int -
Method Summary
Modifier and TypeMethodDescriptionstatic ExpirationActionfromOrdinal(int ordinal) Return the ExpirationAction represented by specified ordinalstatic ExpirationActionfromXmlString(String xmlValue) converts allowed values in cache.xml into ExpirationActionbooleanReturns whether this is the action for distributed destroy.booleanReturns whether this action is distributed.booleanReturns whether this is the action for distributed invalidate.booleanisLocal()Returns whether this action is local.booleanReturns whether this is the action for local destroy.booleanReturns whether this is the action for local invalidate.toString()Returns a string representation for this actionconverts to strings used in cache.xml
-
Field Details
-
INVALIDATE
When the region or cached object expires, it is invalidated. -
LOCAL_INVALIDATE
When expired, invalidated locally only. Not supported for partitioned regions. -
DESTROY
When the region or cached object expires, it is destroyed. -
LOCAL_DESTROY
When expired, destroyed locally only. Not supported for partitioned regions. Use DESTROY instead. -
ordinal
public final int ordinal
-
-
Method Details
-
isInvalidate
public boolean isInvalidate()Returns whether this is the action for distributed invalidate.- Returns:
- true if this in INVALIDATE
-
isLocalInvalidate
public boolean isLocalInvalidate()Returns whether this is the action for local invalidate.- Returns:
- true if this is LOCAL_INVALIDATE
-
isDestroy
public boolean isDestroy()Returns whether this is the action for distributed destroy.- Returns:
- true if this is DESTROY
-
isLocalDestroy
public boolean isLocalDestroy()Returns whether this is the action for local destroy.- Returns:
- true if thisis LOCAL_DESTROY
-
isLocal
public boolean isLocal()Returns whether this action is local.- Returns:
- true if this is LOCAL_INVALIDATE or LOCAL_DESTROY
-
isDistributed
public boolean isDistributed()Returns whether this action is distributed.- Returns:
- true if this is INVALIDATE or DESTROY
-
toString
Returns a string representation for this action -
toXmlString
converts to strings used in cache.xml- Returns:
- strings used in cache.xml
-
fromXmlString
converts allowed values in cache.xml into ExpirationAction- Parameters:
xmlValue- the values allowed are: invalidate, destroy, local-invalidate, local-destroy- Returns:
- the corresponding ExpirationAction
- Throws:
IllegalArgumentException- for all other invalid strings.
-
fromOrdinal
Return the ExpirationAction represented by specified ordinal- Parameters:
ordinal- the ordinal representation of an ExpirationAction- Returns:
- the ExpirationAction represented by specified ordinal
-