Class ClusteringConfigurationBuilder
- java.lang.Object
-
- org.infinispan.configuration.cache.ClusteringConfigurationBuilder
-
- All Implemented Interfaces:
Builder<ClusteringConfiguration>
,ClusteringConfigurationChildBuilder
,ConfigurationChildBuilder
public class ClusteringConfigurationBuilder extends Object implements ClusteringConfigurationChildBuilder, Builder<ClusteringConfiguration>
Defines clustered characteristics of the cache.- Author:
- pmuir
-
-
Field Summary
Fields Modifier and Type Field Description protected ConfigurationBuilder
builder
-
Method Summary
-
Methods inherited from interface org.infinispan.configuration.cache.ConfigurationChildBuilder
build, clustering, customInterceptors, encoding, expiration, indexing, invocationBatching, jmxStatistics, locking, memory, persistence, security, simpleCache, simpleCache, sites, statistics, template, transaction, unsafe
-
-
-
-
Field Detail
-
builder
protected final ConfigurationBuilder builder
-
-
Method Detail
-
cacheMode
public ClusteringConfigurationBuilder cacheMode(CacheMode cacheMode)
Cache mode. SeeCacheMode
for information on the various cache modes available.
-
cacheMode
public CacheMode cacheMode()
-
remoteTimeout
public ClusteringConfigurationBuilder remoteTimeout(long l)
This is the timeout used to wait for an acknowledgment when making a remote call, after which the call is aborted and an exception is thrown.
-
remoteTimeout
public ClusteringConfigurationBuilder remoteTimeout(long l, TimeUnit unit)
This is the timeout used to wait for an acknowledgment when making a remote call, after which the call is aborted and an exception is thrown.
-
invalidationBatchSize
public ClusteringConfigurationBuilder invalidationBatchSize(int size)
For scattered cache, the threshold after which batched invalidations are sent
-
biasAcquisition
public ClusteringConfigurationBuilder biasAcquisition(BiasAcquisition biasAcquisition)
Used in scattered cache. Acquired bias allows reading data on non-owner, but slows down further writes from other nodes.
-
biasLifespan
public ClusteringConfigurationBuilder biasLifespan(long l, TimeUnit unit)
Used in scattered cache. Specifies the duration (in Milliseconds) that acquired bias can be held; while the reads will never be stale, tracking that information consumes memory on the primary owner.
-
hash
public HashConfigurationBuilder hash()
Configure hash sub element- Specified by:
hash
in interfaceClusteringConfigurationChildBuilder
-
l1
public L1ConfigurationBuilder l1()
This method allows configuration of the L1 cache for distributed caches. L1 should be explicitly enabled by callingL1ConfigurationBuilder.enable()
- Specified by:
l1
in interfaceClusteringConfigurationChildBuilder
-
stateTransfer
public StateTransferConfigurationBuilder stateTransfer()
Configure thestateTransfer
sub element for distributed and replicated caches. It doesn't have any effect on LOCAL or INVALIDATION-mode caches.- Specified by:
stateTransfer
in interfaceClusteringConfigurationChildBuilder
-
partitionHandling
public PartitionHandlingConfigurationBuilder partitionHandling()
Description copied from interface:ClusteringConfigurationChildBuilder
Configures how the cache will react to cluster partitions.- Specified by:
partitionHandling
in interfaceClusteringConfigurationChildBuilder
-
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<ClusteringConfiguration>
-
validate
public void validate(GlobalConfiguration globalConfig)
- Specified by:
validate
in interfaceConfigurationChildBuilder
-
create
public ClusteringConfiguration create()
Description copied from interface:Builder
Create the configuration bean- Specified by:
create
in interfaceBuilder<ClusteringConfiguration>
- Returns:
-
read
public ClusteringConfigurationBuilder read(ClusteringConfiguration 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<ClusteringConfiguration>
- 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
-
-