Class ExpirationAttributesFactoryBean
java.lang.Object
org.springframework.data.gemfire.expiration.ExpirationAttributesFactoryBean
- All Implemented Interfaces:
FactoryBean<ExpirationAttributes>
,InitializingBean
public class ExpirationAttributesFactoryBean
extends Object
implements FactoryBean<ExpirationAttributes>, 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
- Author:
- John Blum
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final 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.Gets the action to perform when a Region or an Entry expires.Class<?>
int
Gets the number of seconds before a Region or an Entry expires.boolean
void
setAction
(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
-
-
Constructor Details
-
ExpirationAttributesFactoryBean
public ExpirationAttributesFactoryBean()
-
-
Method Details
-
getObject
- Specified by:
getObject
in interfaceFactoryBean<ExpirationAttributes>
- Throws:
Exception
-
getObjectType
- Specified by:
getObjectType
in interfaceFactoryBean<ExpirationAttributes>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingleton
in interfaceFactoryBean<ExpirationAttributes>
-
setAction
Sets the action to perform when a Region or an Entry expire.- Parameters:
action
- the type of action to perform on expiration- See Also:
-
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
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:
-
afterPropertiesSet
Initializes the GemFire ExpirationAttributes produced by this factory.- Specified by:
afterPropertiesSet
in interfaceInitializingBean
- Throws:
Exception
- if the construction of the ExpirationAttributes was not successful.- See Also:
-