Class AsyncStoreConfigurationBuilder<S>
- java.lang.Object
-
- org.infinispan.configuration.cache.AbstractPersistenceConfigurationChildBuilder
-
- org.infinispan.configuration.cache.AbstractStoreConfigurationChildBuilder<S>
-
- org.infinispan.configuration.cache.AsyncStoreConfigurationBuilder<S>
-
- All Implemented Interfaces:
BaseConfigurationInfo,Builder<AsyncStoreConfiguration>,ConfigurationBuilderInfo,ConfigurationChildBuilder,PersistenceConfigurationChildBuilder,StoreConfigurationChildBuilder<S>
public class AsyncStoreConfigurationBuilder<S> extends AbstractStoreConfigurationChildBuilder<S> implements Builder<AsyncStoreConfiguration>, ConfigurationBuilderInfo
Configuration for the async cache store. If enabled, this configuration provides asynchronous writes to the cache store or 'write-behind' caching.- Author:
- pmuir
-
-
Method Summary
-
Methods inherited from class org.infinispan.configuration.cache.AbstractStoreConfigurationChildBuilder
addProperty, async, fetchPersistentState, ignoreModifications, maxBatchSize, preload, purgeOnStartup, segmented, shared, transactional, withProperties
-
Methods inherited from interface org.infinispan.commons.configuration.ConfigurationBuilderInfo
getBuilderInfo, getChildrenInfo, getNewBuilderInfo
-
Methods inherited from interface org.infinispan.configuration.cache.ConfigurationChildBuilder
build, clustering, customInterceptors, encoding, expiration, indexing, invocationBatching, jmxStatistics, locking, memory, security, simpleCache, simpleCache, sites, statistics, template, transaction, unsafe
-
Methods inherited from interface org.infinispan.configuration.cache.PersistenceConfigurationChildBuilder
persistence
-
-
-
-
Method Detail
-
enable
public AsyncStoreConfigurationBuilder<S> enable()
If true, all modifications to this cache store happen asynchronously on a separate thread.
-
disable
public AsyncStoreConfigurationBuilder<S> disable()
-
enabled
public AsyncStoreConfigurationBuilder<S> enabled(boolean enabled)
-
getElementDefinition
public org.infinispan.commons.configuration.elements.ElementDefinition getElementDefinition()
- Specified by:
getElementDefinitionin interfaceBaseConfigurationInfo- Returns:
- the
ElementDefinitionof the configuration.
-
attributes
public org.infinispan.commons.configuration.attributes.AttributeSet attributes()
- Specified by:
attributesin interfaceBaseConfigurationInfo- Returns:
- the
AttributeSetdeclared by the configuration.
-
modificationQueueSize
public AsyncStoreConfigurationBuilder<S> modificationQueueSize(int i)
Sets the size of the modification queue for the async store. If updates are made at a rate that is faster than the underlying cache store can process this queue, then the async store behaves like a synchronous store for that period, blocking until the queue can accept more elements.
-
threadPoolSize
public AsyncStoreConfigurationBuilder<S> threadPoolSize(int i)
Configures the number of threads in the thread pool that is responsible for applying modifications.
-
failSilently
public AsyncStoreConfigurationBuilder<S> failSilently(boolean failSilently)
- Parameters:
failSilently- If true, the async store attempts to perform write operations only as many times as configured with `connection-attempts` in the PersistenceConfiguration. If all attempts fail, the errors are ignored and the write operations are not executed on the store. If false, write operations that fail are attempted again when the underlying store becomes available. If the modification queue becomes full before the underlying store becomes available, an error is thrown on all future write operations to the store until the modification queue is flushed. The modification queue is not persisted. If the underlying store does not become available before the Async store is stopped, queued modifications are lost.
-
validate
public void validate()
Description copied from interface:BuilderValidate the data in this builder before building the configuration bean
-
validate
public void validate(GlobalConfiguration globalConfig)
- Specified by:
validatein interfaceConfigurationChildBuilder
-
create
public AsyncStoreConfiguration create()
Description copied from interface:BuilderCreate the configuration bean
-
read
public AsyncStoreConfigurationBuilder<S> read(AsyncStoreConfiguration 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
-
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
-
-