Class ClusteringConfigurationBuilder
- java.lang.Object
-
- org.infinispan.configuration.cache.ClusteringConfigurationBuilder
-
- All Implemented Interfaces:
BaseConfigurationInfo
,Builder<ClusteringConfiguration>
,ConfigurationBuilderInfo
,ClusteringConfigurationChildBuilder
,ConfigurationChildBuilder
public class ClusteringConfigurationBuilder extends java.lang.Object implements ClusteringConfigurationChildBuilder, Builder<ClusteringConfiguration>, ConfigurationBuilderInfo
Defines clustered characteristics of the cache.- Author:
- pmuir
-
-
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 AttributeSet
attributes()
ClusteringConfigurationBuilder
biasAcquisition(BiasAcquisition biasAcquisition)
Used in scattered cache.ClusteringConfigurationBuilder
biasLifespan(long l, java.util.concurrent.TimeUnit unit)
Used in scattered cache.Configuration
build()
CacheMode
cacheMode()
ClusteringConfigurationBuilder
cacheMode(CacheMode cacheMode)
Cache mode.ClusteringConfigurationBuilder
clustering()
ClusteringConfiguration
create()
Create the configuration beanCustomInterceptorsConfigurationBuilder
customInterceptors()
Deprecated.Since 10.0, custom interceptors support will be removed and only modules will be able to define interceptorsEncodingConfigurationBuilder
encoding()
ExpirationConfigurationBuilder
expiration()
protected ConfigurationBuilder
getBuilder()
java.util.Collection<ConfigurationBuilderInfo>
getChildrenInfo()
ElementDefinition<? extends ConfigurationInfo>
getElementDefinition()
HashConfigurationBuilder
hash()
Configure hash sub elementIndexingConfigurationBuilder
indexing()
ClusteringConfigurationBuilder
invalidationBatchSize(int size)
For scattered cache, the threshold after which batched invalidations are sentInvocationBatchingConfigurationBuilder
invocationBatching()
JMXStatisticsConfigurationBuilder
jmxStatistics()
L1ConfigurationBuilder
l1()
This method allows configuration of the L1 cache for distributed caches.LockingConfigurationBuilder
locking()
MemoryConfigurationBuilder
memory()
PartitionHandlingConfigurationBuilder
partitionHandling()
Configures how the cache will react to cluster partitions.PersistenceConfigurationBuilder
persistence()
ClusteringConfigurationBuilder
read(ClusteringConfiguration template)
Reads the configuration from an already created configuration bean into this builder.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.ClusteringConfigurationBuilder
remoteTimeout(long l, java.util.concurrent.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.SecurityConfigurationBuilder
security()
boolean
simpleCache()
ConfigurationChildBuilder
simpleCache(boolean simpleCache)
SitesConfigurationBuilder
sites()
StateTransferConfigurationBuilder
stateTransfer()
Configure thestateTransfer
sub element for distributed and replicated caches.ConfigurationChildBuilder
template(boolean template)
java.lang.String
toString()
TransactionConfigurationBuilder
transaction()
UnsafeConfigurationBuilder
unsafe()
void
validate()
Validate the data in this builder before building the configuration beanvoid
validate(GlobalConfiguration globalConfig)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.infinispan.commons.configuration.ConfigurationBuilderInfo
getBuilderInfo, getNewBuilderInfo
-
Methods inherited from interface org.infinispan.configuration.cache.ConfigurationChildBuilder
build, clustering, customInterceptors, encoding, expiration, indexing, invocationBatching, jmxStatistics, locking, memory, persistence, security, simpleCache, simpleCache, sites, template, transaction, unsafe
-
-
-
-
Field Detail
-
builder
protected final ConfigurationBuilder builder
-
-
Method Detail
-
getElementDefinition
public ElementDefinition<? extends ConfigurationInfo> getElementDefinition()
- Specified by:
getElementDefinition
in interfaceBaseConfigurationInfo
- Returns:
- the
ElementDefinition
of the configuration.
-
getChildrenInfo
public java.util.Collection<ConfigurationBuilderInfo> getChildrenInfo()
- Specified by:
getChildrenInfo
in interfaceConfigurationBuilderInfo
- Returns:
- a collection of
ConfigurationBuilderInfo
for the sub-elements of the builder.
-
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, java.util.concurrent.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, java.util.concurrent.TimeUnit unit)
Used in scattered cache. Specifies how long can be the acquired bias held; while the reads will never be stale, tracking that information consumes memory on 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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
attributes
public AttributeSet attributes()
- Specified by:
attributes
in interfaceBaseConfigurationInfo
- Returns:
- the
AttributeSet
declared by the configuration.
-
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
-
jmxStatistics
public JMXStatisticsConfigurationBuilder jmxStatistics()
- Specified by:
jmxStatistics
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
-
-