Class ExpirationConfiguration
- java.lang.Object
-
- org.infinispan.configuration.cache.ExpirationConfiguration
-
- All Implemented Interfaces:
org.infinispan.commons.configuration.attributes.Matchable<ExpirationConfiguration>,BaseConfigurationInfo,ConfigurationInfo
public class ExpirationConfiguration extends Object implements org.infinispan.commons.configuration.attributes.Matchable<ExpirationConfiguration>, ConfigurationInfo
Controls the default expiration settings for entries in the cache.
-
-
Field Summary
Fields Modifier and Type Field Description static org.infinispan.commons.configuration.elements.ElementDefinitionELEMENT_DEFINITIONstatic org.infinispan.commons.configuration.attributes.AttributeDefinition<Long>LIFESPANstatic org.infinispan.commons.configuration.attributes.AttributeDefinition<Long>MAX_IDLEstatic org.infinispan.commons.configuration.attributes.AttributeDefinition<Boolean>REAPER_ENABLEDstatic org.infinispan.commons.configuration.attributes.AttributeDefinition<TouchMode>TOUCHstatic org.infinispan.commons.configuration.attributes.AttributeDefinition<Long>WAKEUP_INTERVAL
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.infinispan.commons.configuration.attributes.AttributeSetattributes()booleanequals(Object obj)org.infinispan.commons.configuration.elements.ElementDefinitiongetElementDefinition()inthashCode()longlifespan()Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds.longmaxIdle()Maximum idle time a cache entry will be maintained in the cache, in milliseconds.booleanreaperEnabled()Determines whether the background reaper thread is enabled to test entries for expiration.StringtoString()TouchModetouch()Control how the timestamp of read keys are updated on all the key owners in a cluster.longwakeUpInterval()Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores.-
Methods inherited from interface org.infinispan.commons.configuration.ConfigurationInfo
subElements
-
-
-
-
Field Detail
-
LIFESPAN
public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Long> LIFESPAN
-
MAX_IDLE
public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Long> MAX_IDLE
-
REAPER_ENABLED
public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Boolean> REAPER_ENABLED
-
WAKEUP_INTERVAL
public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Long> WAKEUP_INTERVAL
-
TOUCH
public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<TouchMode> TOUCH
-
ELEMENT_DEFINITION
public static final org.infinispan.commons.configuration.elements.ElementDefinition ELEMENT_DEFINITION
-
-
Method Detail
-
getElementDefinition
public org.infinispan.commons.configuration.elements.ElementDefinition getElementDefinition()
- Specified by:
getElementDefinitionin interfaceBaseConfigurationInfo- Returns:
- the
ElementDefinitionof the configuration.
-
lifespan
public long lifespan()
Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds. -1 means the entries never expire. Note that this can be overridden on a per-entry basis by using the Cache API.
-
maxIdle
public long maxIdle()
Maximum idle time a cache entry will be maintained in the cache, in milliseconds. If the idle time is exceeded, the entry will be expired cluster-wide. -1 means the entries never expire. Note that this can be overridden on a per-entry basis by using the Cache API.
-
reaperEnabled
public boolean reaperEnabled()
Determines whether the background reaper thread is enabled to test entries for expiration. Regardless of whether a reaper is used, entries are tested for expiration lazily when they are touched.
-
wakeUpInterval
public long wakeUpInterval()
Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores. If you wish to disable the periodic eviction process altogether, set wakeupInterval to -1.
-
touch
public TouchMode touch()
Control how the timestamp of read keys are updated on all the key owners in a cluster. Default isTouchMode.SYNC. If the cache mode is ASYNC this attribute is ignored, and timestamps are updated asynchronously.
-
toString
public String toString()
-
equals
public boolean equals(Object obj)
-
hashCode
public int hashCode()
-
attributes
public org.infinispan.commons.configuration.attributes.AttributeSet attributes()
- Specified by:
attributesin interfaceBaseConfigurationInfo- Returns:
- the
AttributeSetdeclared by the configuration.
-
-