ExpirationAction (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.cache, class: ExpirationAction

Package org.apache.geode.cache

# Class ExpirationAction

java.lang.Object
org.apache.geode.cache.ExpirationAction

All Implemented Interfaces:
  `Serializable`

public class ExpirationAction extends Object implements Serializable
Enumerated type for expiration actions.

Since:
  GemFire 3.0
See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final ExpirationAction`
  `DESTROY`
  When the region or cached object expires, it is destroyed.
  `static final ExpirationAction`
  `INVALIDATE`
  When the region or cached object expires, it is invalidated.
  `static final ExpirationAction`
  `LOCAL_DESTROY`
  When expired, destroyed locally only.
  `static final ExpirationAction`
  `LOCAL_INVALIDATE`
  When expired, invalidated locally only.
  `final int`
  `ordinal`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ExpirationAction`
  `fromOrdinal(int ordinal)`
  Return the ExpirationAction represented by specified ordinal
  `static ExpirationAction`
  `fromXmlString(String xmlValue)`
  converts allowed values in cache.xml into ExpirationAction
  `boolean`
  `isDestroy()`
  Returns whether this is the action for distributed destroy.
  `boolean`
  `isDistributed()`
  Returns whether this action is distributed.
  `boolean`
  `isInvalidate()`
  Returns whether this is the action for distributed invalidate.
  `boolean`
  `isLocal()`
  Returns whether this action is local.
  `boolean`
  `isLocalDestroy()`
  Returns whether this is the action for local destroy.
  `boolean`
  `isLocalInvalidate()`
  Returns whether this is the action for local invalidate.
  `String`
  `toString()`
  Returns a string representation for this action
  `String`
  `toXmlString()`
  converts to strings used in cache.xml

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### INVALIDATE

    @Immutable public static final ExpirationAction INVALIDATE
    When the region or cached object expires, it is invalidated.

  - ### LOCAL_INVALIDATE

    @Immutable public static final ExpirationAction LOCAL_INVALIDATE
    When expired, invalidated locally only. Not supported for partitioned regions.

  - ### DESTROY

    @Immutable public static final ExpirationAction DESTROY
    When the region or cached object expires, it is destroyed.

  - ### LOCAL_DESTROY

    @Immutable public static final ExpirationAction 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

    public String toString()
    Returns a string representation for this action
    Overrides:
      `toString` in class `Object`
    Returns:
      the name of this action

  - ### toXmlString

    public String toXmlString()
    converts to strings used in cache.xml
    Returns:
      strings used in cache.xml

  - ### fromXmlString

    public static ExpirationAction fromXmlString(String xmlValue)
    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

    public static ExpirationAction fromOrdinal(int ordinal)
    Return the ExpirationAction represented by specified ordinal
    Parameters:
      `ordinal` - the ordinal representation of an ExpirationAction
    Returns:
      the ExpirationAction represented by specified ordinal