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:
getElementDefinition
in interfaceBaseConfigurationInfo
- Returns:
- the
ElementDefinition
of the configuration.
-
attributes
public org.infinispan.commons.configuration.attributes.AttributeSet attributes()
- Specified by:
attributes
in interfaceBaseConfigurationInfo
- Returns:
- the
AttributeSet
declared 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:Builder
Validate the data in this builder before building the configuration bean
-
validate
public void validate(GlobalConfiguration globalConfig)
- Specified by:
validate
in interfaceConfigurationChildBuilder
-
create
public AsyncStoreConfiguration create()
Description copied from interface:Builder
Create the configuration bean
-
read
public AsyncStoreConfigurationBuilder<S> read(AsyncStoreConfiguration 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
-
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
-
-