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 ConfigurationBuilderbuilder
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.infinispan.commons.configuration.attributes.AttributeSetattributes()Configurationbuild()ClusteringConfigurationBuilderclustering()ExpirationConfigurationcreate()Create the configuration beanCustomInterceptorsConfigurationBuildercustomInterceptors()Deprecated.Since 10.0, custom interceptors support will be removed and only modules will be able to define interceptorsExpirationConfigurationBuilderdisableReaper()Disable the background reaper to test entries for expiration.ExpirationConfigurationBuilderenableReaper()Enable the background reaper to test entries for expiration.EncodingConfigurationBuilderencoding()ExpirationConfigurationBuilderexpiration()protected ConfigurationBuildergetBuilder()org.infinispan.commons.configuration.elements.ElementDefinitiongetElementDefinition()IndexingConfigurationBuilderindexing()InvocationBatchingConfigurationBuilderinvocationBatching()ExpirationConfigurationBuilderlifespan(long l)Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds.ExpirationConfigurationBuilderlifespan(long l, TimeUnit unit)Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds.LockingConfigurationBuilderlocking()ExpirationConfigurationBuildermaxIdle(long l)Maximum idle time a cache entry will be maintained in the cache, in milliseconds.ExpirationConfigurationBuildermaxIdle(long l, TimeUnit unit)Maximum idle time a cache entry will be maintained in the cache, in milliseconds.MemoryConfigurationBuildermemory()PersistenceConfigurationBuilderpersistence()ExpirationConfigurationBuilderread(ExpirationConfiguration template)Reads the configuration from an already created configuration bean into this builder.booleanreaperEnabled()ExpirationConfigurationBuilderreaperEnabled(boolean enabled)Enable the background reaper to test entries for expiration.SecurityConfigurationBuildersecurity()booleansimpleCache()ConfigurationChildBuildersimpleCache(boolean simpleCache)SitesConfigurationBuildersites()StatisticsConfigurationBuilderstatistics()ConfigurationChildBuildertemplate(boolean template)StringtoString()TransactionConfigurationBuildertransaction()UnsafeConfigurationBuilderunsafe()voidvalidate()Validate the data in this builder before building the configuration beanvoidvalidate(GlobalConfiguration globalConfig)longwakeupInterval()ExpirationConfigurationBuilderwakeUpInterval(long l)Interval (in milliseconds) between subsequent runs to purge expired entries from memory and any cache stores.ExpirationConfigurationBuilderwakeUpInterval(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:
getElementDefinitionin interfaceBaseConfigurationInfo- Returns:
- the
ElementDefinitionof 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.
-
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
public void validate(GlobalConfiguration globalConfig)
- Specified by:
validatein interfaceConfigurationChildBuilder
-
attributes
public org.infinispan.commons.configuration.attributes.AttributeSet attributes()
- Specified by:
attributesin interfaceBaseConfigurationInfo- Returns:
- the
AttributeSetdeclared by the configuration.
-
create
public ExpirationConfiguration create()
Description copied from interface:BuilderCreate the configuration bean- Specified by:
createin interfaceBuilder<ExpirationConfiguration>- Returns:
-
read
public ExpirationConfigurationBuilder read(ExpirationConfiguration template)
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.
-
toString
public String toString()
-
template
public ConfigurationChildBuilder template(boolean template)
- Specified by:
templatein interfaceConfigurationChildBuilder
-
simpleCache
public ConfigurationChildBuilder simpleCache(boolean simpleCache)
- Specified by:
simpleCachein interfaceConfigurationChildBuilder
-
simpleCache
public boolean simpleCache()
- Specified by:
simpleCachein interfaceConfigurationChildBuilder
-
clustering
public ClusteringConfigurationBuilder clustering()
- Specified by:
clusteringin 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:
customInterceptorsin interfaceConfigurationChildBuilder
-
encoding
public EncodingConfigurationBuilder encoding()
- Specified by:
encodingin interfaceConfigurationChildBuilder
-
expiration
public ExpirationConfigurationBuilder expiration()
- Specified by:
expirationin interfaceConfigurationChildBuilder
-
indexing
public IndexingConfigurationBuilder indexing()
- Specified by:
indexingin interfaceConfigurationChildBuilder
-
invocationBatching
public InvocationBatchingConfigurationBuilder invocationBatching()
- Specified by:
invocationBatchingin interfaceConfigurationChildBuilder
-
statistics
public StatisticsConfigurationBuilder statistics()
- Specified by:
statisticsin interfaceConfigurationChildBuilder
-
persistence
public PersistenceConfigurationBuilder persistence()
- Specified by:
persistencein interfaceConfigurationChildBuilder
-
locking
public LockingConfigurationBuilder locking()
- Specified by:
lockingin interfaceConfigurationChildBuilder
-
security
public SecurityConfigurationBuilder security()
- Specified by:
securityin interfaceConfigurationChildBuilder
-
transaction
public TransactionConfigurationBuilder transaction()
- Specified by:
transactionin interfaceConfigurationChildBuilder
-
unsafe
public UnsafeConfigurationBuilder unsafe()
- Specified by:
unsafein interfaceConfigurationChildBuilder
-
sites
public SitesConfigurationBuilder sites()
- Specified by:
sitesin interfaceConfigurationChildBuilder
-
memory
public MemoryConfigurationBuilder memory()
- Specified by:
memoryin interfaceConfigurationChildBuilder
-
getBuilder
protected ConfigurationBuilder getBuilder()
-
build
public Configuration build()
- Specified by:
buildin interfaceConfigurationChildBuilder
-
-