Class ExpirationConfigurationBuilder
java.lang.Object
org.infinispan.configuration.cache.ExpirationConfigurationBuilder
- All Implemented Interfaces:
Builder<ExpirationConfiguration>
,ConfigurationChildBuilder
public class ExpirationConfigurationBuilder
extends Object
implements Builder<ExpirationConfiguration>
Controls the default expiration settings for entries in the cache.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuild()
create()
Create the configuration beanDeprecated.Since 10.0, custom interceptors support will be removed and only modules will be able to define interceptorsDisable the background reaper to test entries for expiration.Enable the background reaper to test entries for expiration.encoding()
protected ConfigurationBuilder
indexing()
lifespan
(long l) Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds.Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds.locking()
long
maxIdle()
Maximum idle time a cache entry will be maintained in the cache, in milliseconds.maxIdle
(long l) Maximum idle time a cache entry will be maintained in the cache, in milliseconds.Maximum idle time a cache entry will be maintained in the cache, in milliseconds.memory()
read
(ExpirationConfiguration template) Reads the configuration from an already created configuration bean into this builder.boolean
reaperEnabled
(boolean enabled) Enable the background reaper to test entries for expiration.security()
boolean
simpleCache
(boolean simpleCache) sites()
template
(boolean template) toString()
Control how the timestamp of read keys are updated on all the key owners in a cluster.unsafe()
void
validate()
Validate the data in this builder before building the configuration beanvoid
validate
(GlobalConfiguration globalConfig) long
wakeUpInterval
(long l) Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores.wakeUpInterval
(long l, TimeUnit unit) Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores.Methods inherited from interface org.infinispan.configuration.cache.ConfigurationChildBuilder
jmxStatistics
-
Field Details
-
builder
-
-
Method Details
-
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. -
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
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. -
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.
-
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.- Returns:
- the max idle setting, default is -1 for disabled
-
enableReaper
Enable the background reaper to test entries for expiration. Regardless of whether a reaper is used, entries are tested for expiration lazily when they are touched. -
reaperEnabled
Enable the background reaper to test entries for expiration. Regardless of whether a reaper is used, entries are tested for expiration lazily when they are touched. -
disableReaper
Disable the background reaper to test entries for expiration. to test entries for expiration. Regardless of whether a reaper is used, entries are tested for expiration lazily when they are touched. -
reaperEnabled
public boolean reaperEnabled() -
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. -
wakeupInterval
public long wakeupInterval() -
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. -
validate
public void validate()Description copied from interface:Builder
Validate the data in this builder before building the configuration bean- Specified by:
validate
in interfaceBuilder<ExpirationConfiguration>
-
validate
- Specified by:
validate
in interfaceConfigurationChildBuilder
-
create
Description copied from interface:Builder
Create the configuration bean- Specified by:
create
in interfaceBuilder<ExpirationConfiguration>
- Returns:
-
read
Description copied from interface:Builder
Reads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
read
in interfaceBuilder<ExpirationConfiguration>
- Parameters:
template
- the configuration from which to "clone" this config if needed.
-
toString
-
template
- Specified by:
template
in interfaceConfigurationChildBuilder
-
simpleCache
- Specified by:
simpleCache
in interfaceConfigurationChildBuilder
-
simpleCache
public boolean simpleCache()- Specified by:
simpleCache
in interfaceConfigurationChildBuilder
-
clustering
- Specified by:
clustering
in interfaceConfigurationChildBuilder
-
customInterceptors
Deprecated.Since 10.0, custom interceptors support will be removed and only modules will be able to define interceptors- Specified by:
customInterceptors
in interfaceConfigurationChildBuilder
-
encoding
- Specified by:
encoding
in interfaceConfigurationChildBuilder
-
expiration
- Specified by:
expiration
in interfaceConfigurationChildBuilder
-
indexing
- Specified by:
indexing
in interfaceConfigurationChildBuilder
-
invocationBatching
- Specified by:
invocationBatching
in interfaceConfigurationChildBuilder
-
statistics
- Specified by:
statistics
in interfaceConfigurationChildBuilder
-
persistence
- Specified by:
persistence
in interfaceConfigurationChildBuilder
-
locking
- Specified by:
locking
in interfaceConfigurationChildBuilder
-
security
- Specified by:
security
in interfaceConfigurationChildBuilder
-
transaction
- Specified by:
transaction
in interfaceConfigurationChildBuilder
-
unsafe
- Specified by:
unsafe
in interfaceConfigurationChildBuilder
-
sites
- Specified by:
sites
in interfaceConfigurationChildBuilder
-
memory
- Specified by:
memory
in interfaceConfigurationChildBuilder
-
getBuilder
-
build
- Specified by:
build
in interfaceConfigurationChildBuilder
-