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
Modifier and TypeFieldDescriptionprotected 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
Class<?>
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
setTimeout
(Integer timeout) Sets the number of seconds before a Region or an Entry expires.
-
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
- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean<org.apache.geode.cache.ExpirationAttributes>
- Throws:
Exception
-
getObjectType
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<org.apache.geode.cache.ExpirationAttributes>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingleton
in interfaceorg.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:
-
ExpirationActionType
ExpirationAttributes.getAction()
-
setTimeout
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
Initializes the GemFire ExpirationAttributes produced by this factory.- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
- if the construction of the ExpirationAttributes was not successful.- See Also:
-
getAction()
getTimeout()
ExpirationActionType.getExpirationAction()
ExpirationAttributes
-