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, for removal: This API element is subject to removal in a future version.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 ConfigurationBuilderindexing()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()longmaxIdle()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()query()read(ExpirationConfiguration template, Combine combine) Reads the configuration from an already created configuration bean into this builder.booleanreaperEnabled(boolean enabled) Enable the background reaper to test entries for expiration.security()booleansimpleCache(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()voidvalidate()Validate the data in this builder before building the configuration beanvoidvalidate(GlobalConfiguration globalConfig) longwakeUpInterval(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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.configuration.cache.ConfigurationChildBuilder
jmxStatistics
-
Field Details
-
builder
-
-
Method Details
-
attributes
- Specified by:
attributesin interfaceBuilder<ExpirationConfiguration>
-
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:BuilderValidate the data in this builder before building the configuration bean- Specified by:
validatein interfaceBuilder<ExpirationConfiguration>
-
validate
- Specified by:
validatein interfaceConfigurationChildBuilder
-
create
Description copied from interface:BuilderCreate the configuration bean- Specified by:
createin interfaceBuilder<ExpirationConfiguration>- Returns:
-
read
Description copied from interface:BuilderReads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
readin interfaceBuilder<ExpirationConfiguration>- Parameters:
template- the configuration from which to "clone" this config if needed.combine- the way attributes and children of this instance and the template should be combined.
-
toString
-
template
- Specified by:
templatein interfaceConfigurationChildBuilder
-
simpleCache
- Specified by:
simpleCachein interfaceConfigurationChildBuilder
-
simpleCache
public boolean simpleCache()- Specified by:
simpleCachein interfaceConfigurationChildBuilder
-
clustering
- Specified by:
clusteringin interfaceConfigurationChildBuilder
-
customInterceptors
Deprecated, for removal: This API element is subject to removal in a future version.Since 10.0, custom interceptors support will be removed and only modules will be able to define interceptors- Specified by:
customInterceptorsin interfaceConfigurationChildBuilder
-
encoding
- Specified by:
encodingin interfaceConfigurationChildBuilder
-
expiration
- Specified by:
expirationin interfaceConfigurationChildBuilder
-
query
- Specified by:
queryin interfaceConfigurationChildBuilder
-
indexing
- Specified by:
indexingin interfaceConfigurationChildBuilder
-
invocationBatching
- Specified by:
invocationBatchingin interfaceConfigurationChildBuilder
-
statistics
- Specified by:
statisticsin interfaceConfigurationChildBuilder
-
persistence
- Specified by:
persistencein interfaceConfigurationChildBuilder
-
locking
- Specified by:
lockingin interfaceConfigurationChildBuilder
-
security
- Specified by:
securityin interfaceConfigurationChildBuilder
-
transaction
- Specified by:
transactionin interfaceConfigurationChildBuilder
-
unsafe
- Specified by:
unsafein interfaceConfigurationChildBuilder
-
sites
- Specified by:
sitesin interfaceConfigurationChildBuilder
-
memory
- Specified by:
memoryin interfaceConfigurationChildBuilder
-
getBuilder
-
build
- Specified by:
buildin interfaceConfigurationChildBuilder
-