Class ExpirationConfiguration
java.lang.Object
org.infinispan.commons.configuration.attributes.ConfigurationElement<ExpirationConfiguration>
org.infinispan.configuration.cache.ExpirationConfiguration
- All Implemented Interfaces:
Matchable<ExpirationConfiguration>
,Updatable<ExpirationConfiguration>
Controls the default expiration settings for entries in the cache.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final AttributeDefinition
<TimeQuantity> static final AttributeDefinition
<TimeQuantity> static final AttributeDefinition
<Boolean> static final AttributeDefinition
<TouchMode> static final AttributeDefinition
<TimeQuantity> Fields inherited from class org.infinispan.commons.configuration.attributes.ConfigurationElement
attributes, CHILDLESS, children, element, repeated
-
Method Summary
Modifier and TypeMethodDescriptionlong
lifespan()
Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds.long
maxIdle()
Maximum idle time a cache entry will be maintained in the cache, in milliseconds.boolean
Determines whether the background reaper thread is enabled to test entries for expiration.touch()
Control how the timestamp of read keys are updated on all the key owners in a cluster.long
Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores.Methods inherited from class org.infinispan.commons.configuration.attributes.ConfigurationElement
attributes, child, children, children, elementName, equals, findAttribute, hashCode, isModified, list, matches, toString, update, validateUpdate, write
-
Field Details
-
LIFESPAN
-
MAX_IDLE
-
REAPER_ENABLED
-
WAKEUP_INTERVAL
-
TOUCH
-
-
Method Details
-
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
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.
-