Class ExpirationConfiguration
- java.lang.Object
-
- org.infinispan.configuration.cache.ExpirationConfiguration
-
- All Implemented Interfaces:
Matchable<ExpirationConfiguration>
,BaseConfigurationInfo
,ConfigurationInfo
public class ExpirationConfiguration extends java.lang.Object implements Matchable<ExpirationConfiguration>, ConfigurationInfo
Controls the default expiration settings for entries in the cache.
-
-
Field Summary
Fields Modifier and Type Field Description static ElementDefinition
ELEMENT_DEFINITION
static AttributeDefinition<java.lang.Long>
LIFESPAN
static AttributeDefinition<java.lang.Long>
MAX_IDLE
static AttributeDefinition<java.lang.Boolean>
REAPER_ENABLED
static AttributeDefinition<java.lang.Long>
WAKEUP_INTERVAL
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeSet
attributes()
boolean
equals(java.lang.Object obj)
ElementDefinition
getElementDefinition()
int
hashCode()
long
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
reaperEnabled()
Determines whether the background reaper thread is enabled to test entries for expiration.java.lang.String
toString()
long
wakeUpInterval()
Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.commons.configuration.ConfigurationInfo
subElements
-
-
-
-
Field Detail
-
LIFESPAN
public static final AttributeDefinition<java.lang.Long> LIFESPAN
-
MAX_IDLE
public static final AttributeDefinition<java.lang.Long> MAX_IDLE
-
REAPER_ENABLED
public static final AttributeDefinition<java.lang.Boolean> REAPER_ENABLED
-
WAKEUP_INTERVAL
public static final AttributeDefinition<java.lang.Long> WAKEUP_INTERVAL
-
ELEMENT_DEFINITION
public static final ElementDefinition ELEMENT_DEFINITION
-
-
Method Detail
-
getElementDefinition
public ElementDefinition getElementDefinition()
- Specified by:
getElementDefinition
in interfaceBaseConfigurationInfo
- Returns:
- the
ElementDefinition
of 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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
attributes
public AttributeSet attributes()
- Specified by:
attributes
in interfaceBaseConfigurationInfo
- Returns:
- the
AttributeSet
declared by the configuration.
-
-