Class ExpirationConfigurationBuilder
- java.lang.Object
-
- org.infinispan.configuration.cache.ExpirationConfigurationBuilder
-
- All Implemented Interfaces:
BaseConfigurationInfo
,Builder<ExpirationConfiguration>
,ConfigurationBuilderInfo
,ConfigurationChildBuilder
public class ExpirationConfigurationBuilder extends Object implements Builder<ExpirationConfiguration>, ConfigurationBuilderInfo
Controls the default expiration settings for entries in the cache.
-
-
Field Summary
Fields Modifier and Type Field Description protected ConfigurationBuilder
builder
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.infinispan.commons.configuration.attributes.AttributeSet
attributes()
Configuration
build()
ClusteringConfigurationBuilder
clustering()
ExpirationConfiguration
create()
Create the configuration beanCustomInterceptorsConfigurationBuilder
customInterceptors()
Deprecated.Since 10.0, custom interceptors support will be removed and only modules will be able to define interceptorsExpirationConfigurationBuilder
disableReaper()
Disable the background reaper to test entries for expiration.ExpirationConfigurationBuilder
enableReaper()
Enable the background reaper to test entries for expiration.EncodingConfigurationBuilder
encoding()
ExpirationConfigurationBuilder
expiration()
protected ConfigurationBuilder
getBuilder()
org.infinispan.commons.configuration.elements.ElementDefinition
getElementDefinition()
IndexingConfigurationBuilder
indexing()
InvocationBatchingConfigurationBuilder
invocationBatching()
ExpirationConfigurationBuilder
lifespan(long l)
Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds.ExpirationConfigurationBuilder
lifespan(long l, TimeUnit unit)
Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds.LockingConfigurationBuilder
locking()
ExpirationConfigurationBuilder
maxIdle(long l)
Maximum idle time a cache entry will be maintained in the cache, in milliseconds.ExpirationConfigurationBuilder
maxIdle(long l, TimeUnit unit)
Maximum idle time a cache entry will be maintained in the cache, in milliseconds.MemoryConfigurationBuilder
memory()
PersistenceConfigurationBuilder
persistence()
ExpirationConfigurationBuilder
read(ExpirationConfiguration template)
Reads the configuration from an already created configuration bean into this builder.boolean
reaperEnabled()
ExpirationConfigurationBuilder
reaperEnabled(boolean enabled)
Enable the background reaper to test entries for expiration.SecurityConfigurationBuilder
security()
boolean
simpleCache()
ConfigurationChildBuilder
simpleCache(boolean simpleCache)
SitesConfigurationBuilder
sites()
StatisticsConfigurationBuilder
statistics()
ConfigurationChildBuilder
template(boolean template)
String
toString()
ExpirationConfigurationBuilder
touch(TouchMode touchMode)
Control how the timestamp of read keys are updated on all the key owners in a cluster.TransactionConfigurationBuilder
transaction()
UnsafeConfigurationBuilder
unsafe()
void
validate()
Validate the data in this builder before building the configuration beanvoid
validate(GlobalConfiguration globalConfig)
long
wakeupInterval()
ExpirationConfigurationBuilder
wakeUpInterval(long l)
Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores.ExpirationConfigurationBuilder
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.commons.configuration.ConfigurationBuilderInfo
getBuilderInfo, getChildrenInfo, getNewBuilderInfo
-
Methods inherited from interface org.infinispan.configuration.cache.ConfigurationChildBuilder
jmxStatistics
-
-
-
-
Field Detail
-
builder
protected final ConfigurationBuilder builder
-
-
Method Detail
-
getElementDefinition
public org.infinispan.commons.configuration.elements.ElementDefinition getElementDefinition()
- Specified by:
getElementDefinition
in interfaceBaseConfigurationInfo
- Returns:
- the
ElementDefinition
of the configuration.
-
lifespan
public ExpirationConfigurationBuilder lifespan(long l)
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
public ExpirationConfigurationBuilder lifespan(long l, TimeUnit unit)
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 ExpirationConfigurationBuilder maxIdle(long l)
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 ExpirationConfigurationBuilder maxIdle(long l, TimeUnit unit)
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.
-
enableReaper
public ExpirationConfigurationBuilder 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
public ExpirationConfigurationBuilder reaperEnabled(boolean enabled)
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
public ExpirationConfigurationBuilder 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
public ExpirationConfigurationBuilder wakeUpInterval(long l)
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
public ExpirationConfigurationBuilder wakeUpInterval(long l, TimeUnit unit)
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 ExpirationConfigurationBuilder touch(TouchMode touchMode)
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
public void validate(GlobalConfiguration globalConfig)
- Specified by:
validate
in interfaceConfigurationChildBuilder
-
attributes
public org.infinispan.commons.configuration.attributes.AttributeSet attributes()
- Specified by:
attributes
in interfaceBaseConfigurationInfo
- Returns:
- the
AttributeSet
declared by the configuration.
-
create
public ExpirationConfiguration create()
Description copied from interface:Builder
Create the configuration bean- Specified by:
create
in interfaceBuilder<ExpirationConfiguration>
- Returns:
-
read
public ExpirationConfigurationBuilder read(ExpirationConfiguration template)
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
public String toString()
-
template
public ConfigurationChildBuilder template(boolean template)
- Specified by:
template
in interfaceConfigurationChildBuilder
-
simpleCache
public ConfigurationChildBuilder simpleCache(boolean simpleCache)
- Specified by:
simpleCache
in interfaceConfigurationChildBuilder
-
simpleCache
public boolean simpleCache()
- Specified by:
simpleCache
in interfaceConfigurationChildBuilder
-
clustering
public ClusteringConfigurationBuilder clustering()
- Specified by:
clustering
in interfaceConfigurationChildBuilder
-
customInterceptors
@Deprecated public CustomInterceptorsConfigurationBuilder 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
public EncodingConfigurationBuilder encoding()
- Specified by:
encoding
in interfaceConfigurationChildBuilder
-
expiration
public ExpirationConfigurationBuilder expiration()
- Specified by:
expiration
in interfaceConfigurationChildBuilder
-
indexing
public IndexingConfigurationBuilder indexing()
- Specified by:
indexing
in interfaceConfigurationChildBuilder
-
invocationBatching
public InvocationBatchingConfigurationBuilder invocationBatching()
- Specified by:
invocationBatching
in interfaceConfigurationChildBuilder
-
statistics
public StatisticsConfigurationBuilder statistics()
- Specified by:
statistics
in interfaceConfigurationChildBuilder
-
persistence
public PersistenceConfigurationBuilder persistence()
- Specified by:
persistence
in interfaceConfigurationChildBuilder
-
locking
public LockingConfigurationBuilder locking()
- Specified by:
locking
in interfaceConfigurationChildBuilder
-
security
public SecurityConfigurationBuilder security()
- Specified by:
security
in interfaceConfigurationChildBuilder
-
transaction
public TransactionConfigurationBuilder transaction()
- Specified by:
transaction
in interfaceConfigurationChildBuilder
-
unsafe
public UnsafeConfigurationBuilder unsafe()
- Specified by:
unsafe
in interfaceConfigurationChildBuilder
-
sites
public SitesConfigurationBuilder sites()
- Specified by:
sites
in interfaceConfigurationChildBuilder
-
memory
public MemoryConfigurationBuilder memory()
- Specified by:
memory
in interfaceConfigurationChildBuilder
-
getBuilder
protected ConfigurationBuilder getBuilder()
-
build
public Configuration build()
- Specified by:
build
in interfaceConfigurationChildBuilder
-
-