Class ExpirationAttributesFactoryBean

java.lang.Object
org.springframework.data.gemfire.expiration.ExpirationAttributesFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<org.apache.geode.cache.ExpirationAttributes>, org.springframework.beans.factory.InitializingBean

public class ExpirationAttributesFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<org.apache.geode.cache.ExpirationAttributes>, org.springframework.beans.factory.InitializingBean
The ExpirationAttributesFactoryBean class is a Spring FactoryBean used to create GemFire ExpirationAttributes to specify Expiration policies for Region Time-to-Live (TTL) and Idle-Timeouts (TTI) as well as Entry Time-to-Live (TTL) and Idle-Timeouts (TTI).
Since:
1.6.0
See Also:
  • FactoryBean
  • InitializingBean
  • ExpirationAttributes
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final org.apache.geode.cache.ExpirationAction
     
    protected static final int
     

    Fields inherited from interface org.springframework.beans.factory.FactoryBean

    OBJECT_TYPE_ATTRIBUTE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Initializes the GemFire ExpirationAttributes produced by this factory.
    org.apache.geode.cache.ExpirationAction
    Gets the action to perform when a Region or an Entry expires.
    org.apache.geode.cache.ExpirationAttributes
     
     
    int
    Gets the number of seconds before a Region or an Entry expires.
    boolean
     
    void
    setAction(org.apache.geode.cache.ExpirationAction action)
    Sets the action to perform when a Region or an Entry expire.
    void
    Sets the number of seconds before a Region or an Entry expires.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_TIMEOUT

      protected static final int DEFAULT_TIMEOUT
      See Also:
    • DEFAULT_EXPIRATION_ACTION

      protected static final org.apache.geode.cache.ExpirationAction DEFAULT_EXPIRATION_ACTION
  • Constructor Details

    • ExpirationAttributesFactoryBean

      public ExpirationAttributesFactoryBean()
  • Method Details

    • getObject

      public org.apache.geode.cache.ExpirationAttributes getObject() throws Exception
      Specified by:
      getObject in interface org.springframework.beans.factory.FactoryBean<org.apache.geode.cache.ExpirationAttributes>
      Throws:
      Exception
    • getObjectType

      public Class<?> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<org.apache.geode.cache.ExpirationAttributes>
    • isSingleton

      public boolean isSingleton()
      Specified by:
      isSingleton in interface org.springframework.beans.factory.FactoryBean<org.apache.geode.cache.ExpirationAttributes>
    • setAction

      public void setAction(org.apache.geode.cache.ExpirationAction action)
      Sets the action to perform when a Region or an Entry expire.
      Parameters:
      action - the type of action to perform on expiration
      See Also:
      • ExpirationAction
    • getAction

      public org.apache.geode.cache.ExpirationAction getAction()
      Gets the action to perform when a Region or an Entry expires.
      Returns:
      the type of action to perform on expiration.
      See Also:
    • setTimeout

      public void setTimeout(Integer timeout)
      Sets the number of seconds before a Region or an Entry expires.
      Parameters:
      timeout - the number of seconds before a Region or an Entry expires.
    • getTimeout

      public int getTimeout()
      Gets the number of seconds before a Region or an Entry expires.
      Returns:
      the number of seconds before a Region or an Entry expires.
      See Also:
      • ExpirationAttributes.getTimeout()
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Initializes the GemFire ExpirationAttributes produced by this factory.
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception - if the construction of the ExpirationAttributes was not successful.
      See Also: