|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infinispan.config.AbstractConfigurationBean
org.infinispan.config.AbstractNamedCacheConfigurationBean
org.infinispan.config.Configuration
public class Configuration
Encapsulates the configuration of a Cache. Configures the default cache which can be retrieved via CacheManager.getCache(). These default settings are also used as a starting point when configuring namedCaches, since the default settings are inherited by any named cache.
Nested Class Summary | |
---|---|
static class |
Configuration.AsyncType
If this element is present, all communications are asynchronous, in that whenever a thread sends a message sent over the wire, it does not wait for an acknowledgment before returning. |
static class |
Configuration.BooleanAttributeType
|
static class |
Configuration.CacheMode
Cache replication mode. |
static class |
Configuration.ClusteringType
Defines clustered characteristics of the cache. |
static class |
Configuration.ClusteringTypeAdapter
|
static class |
Configuration.CustomInterceptorsType
Configures custom interceptors to be added to the cache. |
static class |
Configuration.DeadlockDetectionType
This element configures deadlock detection. |
static class |
Configuration.EvictionType
This element controls the eviction settings for the cache. |
static class |
Configuration.ExpirationType
This element controls the default expiration settings for entries in the cache. |
static class |
Configuration.HashType
Allows fine-tuning of rehashing characteristics. |
static class |
Configuration.InvocationBatching
Defines whether invocation batching is allowed in this cache instance, and sets up internals accordingly to allow use of this API. |
static class |
Configuration.JmxStatistics
This element specifies whether cache statistics are gathered and reported via JMX. |
static class |
Configuration.L1Type
This element configures the L1 cache behavior in 'distributed' caches instances. |
static class |
Configuration.LazyDeserialization
A mechanism by which serialization and deserialization of objects is deferred till the point in time in which they are used and needed. |
static class |
Configuration.LockingType
Defines the local, in-VM locking and concurrency characteristics of the cache. |
static class |
Configuration.QueryConfigurationBean
Configures indexing of entries in the cache for searching. |
static class |
Configuration.StateRetrievalType
Configures how state is retrieved when a new cache joins the cluster. |
static class |
Configuration.SyncType
If this element is present, all communications are synchronous, in that whenever a thread sends a message sent over the wire, it blocks until it receives an acknowledgment from the recipient. |
static class |
Configuration.TransactionType
Defines transactional (JTA) characteristics of the cache. |
static class |
Configuration.UnsafeType
Allows you to tune various unsafe or non-standard characteristics. |
Field Summary | |
---|---|
protected String |
name
|
Fields inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean |
---|
cr |
Fields inherited from class org.infinispan.config.AbstractConfigurationBean |
---|
EMPTY_PROPERTIES, log, overriddenConfigurationElements |
Constructor Summary | |
---|---|
Configuration()
|
Method Summary | |
---|---|
void |
accept(ConfigurationBeanVisitor v)
|
void |
applyOverrides(Configuration overrides)
|
void |
assertValid()
|
Configuration |
clone()
|
boolean |
equals(Object o)
|
CacheLoaderManagerConfig |
getCacheLoaderManagerConfig()
|
Configuration.CacheMode |
getCacheMode()
|
String |
getCacheModeString()
|
int |
getCacheStopTimeout()
|
int |
getConcurrencyLevel()
|
String |
getConsistentHashClass()
|
List<CustomInterceptorConfig> |
getCustomInterceptors()
Returns the CustomInterceptorConfig , if any, associated with this configuration
object. |
long |
getDeadlockDetectionSpinDuration()
|
int |
getEvictionMaxEntries()
|
EvictionStrategy |
getEvictionStrategy()
|
EvictionThreadPolicy |
getEvictionThreadPolicy()
|
long |
getEvictionWakeUpInterval()
Eviction thread wake up interval, in milliseconds. |
long |
getExpirationLifespan()
Expiration lifespan, in milliseconds |
long |
getExpirationMaxIdle()
Expiration max idle time, in milliseconds |
GlobalConfiguration |
getGlobalConfiguration()
|
String |
getHashFunctionClass()
|
IsolationLevel |
getIsolationLevel()
|
long |
getL1Lifespan()
|
long |
getLockAcquisitionTimeout()
|
String |
getName()
|
int |
getNumOwners()
|
long |
getRehashRpcTimeout()
|
long |
getRehashWaitTime()
|
String |
getReplQueueClass()
|
long |
getReplQueueInterval()
|
int |
getReplQueueMaxElements()
|
long |
getStateRetrievalInitialRetryWaitTime()
|
long |
getStateRetrievalLogFlushTimeout()
|
int |
getStateRetrievalMaxNonProgressingLogWrites()
|
int |
getStateRetrievalNumRetries()
|
int |
getStateRetrievalRetryWaitTimeIncreaseFactor()
|
long |
getStateRetrievalTimeout()
|
long |
getSyncReplTimeout()
|
TransactionManagerLookup |
getTransactionManagerLookup()
|
String |
getTransactionManagerLookupClass()
|
int |
hashCode()
|
void |
inject(ComponentRegistry cr)
|
boolean |
isAlwaysProvideInMemoryState()
|
boolean |
isEagerLockSingleNode()
|
boolean |
isEnableDeadlockDetection()
|
boolean |
isExposeJmxStatistics()
|
boolean |
isFetchInMemoryState()
|
boolean |
isIndexingEnabled()
|
boolean |
isIndexLocalOnly()
|
boolean |
isInvocationBatchingEnabled()
|
boolean |
isL1CacheEnabled()
|
boolean |
isL1OnRehash()
|
boolean |
isOnePhaseCommit()
|
boolean |
isRehashEnabled()
|
boolean |
isStateTransferEnabled()
|
boolean |
isSyncCommitPhase()
|
boolean |
isSyncRollbackPhase()
|
boolean |
isUnsafeUnreliableReturnValues()
|
boolean |
isUseAsyncMarshalling()
|
boolean |
isUseEagerLocking()
|
boolean |
isUseLazyDeserialization()
|
boolean |
isUseLockStriping()
|
boolean |
isUseReplQueue()
|
boolean |
isUsingCacheLoaders()
|
boolean |
isWriteSkewCheck()
|
void |
setAlwaysProvideInMemoryState(boolean alwaysProvideInMemoryState)
If true, this will allow the cache to provide in-memory state to a neighbor, even if the cache is not configured to fetch state from its neighbors (fetchInMemoryState is false) |
void |
setCacheLoaderManagerConfig(CacheLoaderManagerConfig cacheLoaderManagerConfig)
|
void |
setCacheMode(Configuration.CacheMode cacheModeInt)
Cache mode. |
void |
setCacheMode(String cacheMode)
Cache mode. |
void |
setCacheModeString(String cacheMode)
|
Configuration |
setCacheStopTimeout(int cacheStopTimeout)
If there are any ongoing transactions when a cache is stopped, Infinispan waits for ongoing remote and local transactions to finish. |
void |
setConcurrencyLevel(int concurrencyLevel)
Concurrency level for lock containers. |
void |
setConsistentHashClass(String consistentHashClass)
Fully qualified name of class providing consistent hash algorithm |
void |
setCustomInterceptors(List<CustomInterceptorConfig> customInterceptors)
|
void |
setDeadlockDetectionSpinDuration(long eagerDeadlockSpinDuration)
Time period that determines how often is lock acquisition attempted within maximum time allowed to acquire a particular lock |
void |
setEagerLockSingleNode(boolean eagerLockSingleNode)
Only has effect for DIST mode and when useEagerLocking is set to true. |
void |
setEnableDeadlockDetection(boolean useEagerDeadlockDetection)
Toggle to enable/disable deadlock detection |
void |
setEvictionMaxEntries(int evictionMaxEntries)
Maximum number of entries in a cache instance. |
void |
setEvictionStrategy(EvictionStrategy evictionStrategy)
Eviction strategy. |
void |
setEvictionStrategy(String eStrategy)
Eviction strategy. |
void |
setEvictionThreadPolicy(EvictionThreadPolicy policy)
Threading policy for eviction. |
void |
setEvictionThreadPolicy(String policy)
Threading policy for eviction. |
void |
setEvictionWakeUpInterval(long evictionWakeUpInterval)
Interval between subsequent eviction runs, in milliseconds. |
void |
setExpirationLifespan(long expirationLifespan)
Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds. |
void |
setExpirationMaxIdle(long expirationMaxIdle)
Maximum idle time a cache entry will be maintained in the cache, in milliseconds. |
void |
setExposeJmxStatistics(boolean useMbean)
|
void |
setFetchInMemoryState(boolean fetchInMemoryState)
If true, this will cause the cache to ask neighboring caches for state when it starts up, so the cache starts 'warm', although it will impact startup time. |
void |
setGlobalConfiguration(GlobalConfiguration gc)
|
void |
setHashFunctionClass(String hashFunctionClass)
A fully qualified name of the class providing a hash function, used as a bit spreader and a general hash code generator. |
void |
setIndexingEnabled(boolean enabled)
If enabled, entries will be indexed when they are added to the cache. |
void |
setIndexLocalOnly(boolean indexLocalOnly)
If true, only index changes made locally, ignoring remote changes. |
void |
setInvocationBatchingEnabled(boolean enabled)
Enables invocation batching if set to true. |
void |
setIsolationLevel(IsolationLevel isolationLevel)
Cache isolation level. |
void |
setIsolationLevel(String isolationLevel)
|
void |
setL1CacheEnabled(boolean l1CacheEnabled)
Toggle to enable/disable L1 cache. |
void |
setL1Lifespan(long l1Lifespan)
Maximum lifespan of an entry placed in the L1 cache. |
void |
setL1OnRehash(boolean l1OnRehash)
If true, entries removed due to a rehash will be moved to L1 rather than being removed altogether. |
void |
setLockAcquisitionTimeout(long lockAcquisitionTimeout)
Maximum time to attempt a particular lock acquisition |
void |
setLockAcquisitionTimeout(long lockAcquisitionTimeout,
TimeUnit timeUnit)
Maximum time to attempt a particular lock acquisition |
void |
setNumOwners(int numOwners)
Number of cluster-wide replicas for each cache entry. |
void |
setRehashEnabled(boolean rehashEnabled)
If false, no rebalancing or rehashing will take place when a new node joins the cluster or a node leaves |
void |
setRehashRpcTimeout(long rehashRpcTimeout)
Rehashing timeout |
void |
setRehashWaitTime(long rehashWaitTime)
|
void |
setReplQueueClass(String classname)
This overrides the replication queue implementation class. |
void |
setReplQueueInterval(long replQueueInterval)
If useReplQueue is set to true, this attribute controls how often the asynchronous thread used to flush the replication queue runs. |
void |
setReplQueueInterval(long replQueueInterval,
TimeUnit timeUnit)
|
void |
setReplQueueMaxElements(int replQueueMaxElements)
If useReplQueue is set to true, this attribute can be used to trigger flushing of the queue when it reaches a specific threshold. |
void |
setStateRetrievalInitialRetryWaitTime(long initialRetryWaitTime)
Initial wait time when backing off before retrying state transfer retrieval |
void |
setStateRetrievalInitialRetryWaitTime(long initialRetryWaitTime,
TimeUnit timeUnit)
|
void |
setStateRetrievalLogFlushTimeout(long logFlushTimeout)
This is the maximum amount of time to run a cluster-wide flush, to allow for syncing of transaction logs. |
void |
setStateRetrievalLogFlushTimeout(long logFlushTimeout,
TimeUnit timeUnit)
|
void |
setStateRetrievalMaxNonProgressingLogWrites(int maxNonProgressingLogWrites)
This is the maximum number of non-progressing transaction log writes after which a brute-force flush approach is resorted to, to synchronize transaction logs. |
void |
setStateRetrievalNumRetries(int numRetries)
Number of state retrieval retries before giving up and aborting startup. |
void |
setStateRetrievalRetryWaitTimeIncreaseFactor(int retryWaitTimeIncreaseFactor)
Wait time increase factor over successive state retrieval backoffs |
void |
setStateRetrievalTimeout(long stateRetrievalTimeout)
This is the maximum amount of time - in milliseconds - to wait for state from neighboring caches, before throwing an exception and aborting startup. |
void |
setStateRetrievalTimeout(long stateRetrievalTimeout,
TimeUnit timeUnit)
|
void |
setSyncCommitPhase(boolean syncCommitPhase)
If true, the cluster-wide commit phase in two-phase commit (2PC) transactions will be synchronous, so Infinispan will wait for responses from all nodes to which the commit was sent. |
void |
setSyncReplTimeout(long syncReplTimeout)
This is the timeout (in ms) used to wait for an acknowledgment when making a remote call, after which the call is aborted and an exception is thrown. |
void |
setSyncReplTimeout(long syncReplTimeout,
TimeUnit timeUnit)
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. |
void |
setSyncRollbackPhase(boolean syncRollbackPhase)
If true, the cluster-wide rollback phase in two-phase commit (2PC) transactions will be synchronous, so Infinispan will wait for responses from all nodes to which the rollback was sent. |
void |
setTransactionManagerLookup(TransactionManagerLookup transactionManagerLookup)
|
void |
setTransactionManagerLookupClass(String transactionManagerLookupClass)
Fully qualified class name of a class that looks up a reference to a TransactionManager . |
void |
setUnsafeUnreliableReturnValues(boolean unsafeUnreliableReturnValues)
Toggle to enable/disable return value fetching |
void |
setUseAsyncMarshalling(boolean useAsyncMarshalling)
If true, asynchronous marshalling is enabled which means that caller can return even quicker, but it can suffer from reordering of operations. |
void |
setUseEagerLocking(boolean useEagerLocking)
Only has effect for DIST mode and when useEagerLocking is set to true. |
void |
setUseLazyDeserialization(boolean useLazyDeserialization)
|
void |
setUseLockStriping(boolean useLockStriping)
If true, a pool of shared locks is maintained for all entries that need to be locked. |
void |
setUseReplQueue(boolean useReplQueue)
If true, this forces all async communications to be queued up and sent out periodically as a batch. |
void |
setWriteSkewCheck(boolean writeSkewCheck)
This setting is only applicable in the case of REPEATABLE_READ. |
Methods inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean |
---|
hasComponentStarted |
Methods inherited from class org.infinispan.config.AbstractConfigurationBean |
---|
testImmutability, toTypedProperties, toTypedProperties, uc, willUnmarshall |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String name
Constructor Detail |
---|
public Configuration()
Method Detail |
---|
public void applyOverrides(Configuration overrides)
public void inject(ComponentRegistry cr)
inject
in class AbstractNamedCacheConfigurationBean
public GlobalConfiguration getGlobalConfiguration()
public void setGlobalConfiguration(GlobalConfiguration gc)
public String getName()
public boolean isStateTransferEnabled()
public long getDeadlockDetectionSpinDuration()
public void setDeadlockDetectionSpinDuration(long eagerDeadlockSpinDuration)
eagerDeadlockSpinDuration
- public boolean isEnableDeadlockDetection()
public void setEnableDeadlockDetection(boolean useEagerDeadlockDetection)
useEagerDeadlockDetection
- public void setUseLockStriping(boolean useLockStriping)
useLockStriping
- public boolean isUseLockStriping()
public boolean isUnsafeUnreliableReturnValues()
public void setUnsafeUnreliableReturnValues(boolean unsafeUnreliableReturnValues)
unsafeUnreliableReturnValues
- public void setRehashRpcTimeout(long rehashRpcTimeout)
rehashRpcTimeout
- public long getRehashRpcTimeout()
public boolean isWriteSkewCheck()
public void setWriteSkewCheck(boolean writeSkewCheck)
writeSkewCheck
- public int getConcurrencyLevel()
public void setConcurrencyLevel(int concurrencyLevel)
concurrencyLevel
- public void setReplQueueMaxElements(int replQueueMaxElements)
replQueueMaxElements
- public void setReplQueueInterval(long replQueueInterval)
replQueueInterval
- public void setReplQueueInterval(long replQueueInterval, TimeUnit timeUnit)
public void setReplQueueClass(String classname)
classname
- public void setExposeJmxStatistics(boolean useMbean)
public void setInvocationBatchingEnabled(boolean enabled)
Cache.startBatch()
and Cache.endBatch(boolean)
to demarcate the start and
end of batches.
enabled
- if true, batching is enabled.public void setFetchInMemoryState(boolean fetchInMemoryState)
fetchInMemoryState
- public void setAlwaysProvideInMemoryState(boolean alwaysProvideInMemoryState)
alwaysProvideInMemoryState
- public void setLockAcquisitionTimeout(long lockAcquisitionTimeout)
lockAcquisitionTimeout
- public void setLockAcquisitionTimeout(long lockAcquisitionTimeout, TimeUnit timeUnit)
lockAcquisitionTimeout
- timeUnit
- public void setSyncReplTimeout(long syncReplTimeout)
syncReplTimeout
- public void setSyncReplTimeout(long syncReplTimeout, TimeUnit timeUnit)
syncReplTimeout
- timeUnit
- public void setCacheMode(Configuration.CacheMode cacheModeInt)
public void setCacheMode(String cacheMode)
public String getCacheModeString()
public void setCacheModeString(String cacheMode)
public long getEvictionWakeUpInterval()
public void setEvictionWakeUpInterval(long evictionWakeUpInterval)
evictionWakeUpInterval
- public EvictionStrategy getEvictionStrategy()
public void setEvictionStrategy(EvictionStrategy evictionStrategy)
evictionStrategy
- public void setEvictionStrategy(String eStrategy)
eStrategy
- public EvictionThreadPolicy getEvictionThreadPolicy()
public void setEvictionThreadPolicy(EvictionThreadPolicy policy)
policy
- public void setEvictionThreadPolicy(String policy)
policy
- public int getEvictionMaxEntries()
public void setEvictionMaxEntries(int evictionMaxEntries)
evictionMaxEntries
- public long getExpirationLifespan()
public void setExpirationLifespan(long expirationLifespan)
expirationLifespan
- public long getExpirationMaxIdle()
public void setExpirationMaxIdle(long expirationMaxIdle)
expirationMaxIdle
- public void setTransactionManagerLookupClass(String transactionManagerLookupClass)
TransactionManager
.
The default provided is capable of locating the default TransactionManager in most popular Java EE systems, using
a JNDI lookup.
transactionManagerLookupClass
- public void setTransactionManagerLookup(TransactionManagerLookup transactionManagerLookup)
public void setCacheLoaderManagerConfig(CacheLoaderManagerConfig cacheLoaderManagerConfig)
public void setSyncCommitPhase(boolean syncCommitPhase)
syncCommitPhase
- public void setSyncRollbackPhase(boolean syncRollbackPhase)
syncRollbackPhase
- public void setUseEagerLocking(boolean useEagerLocking)
useEagerLocking
- public void setEagerLockSingleNode(boolean eagerLockSingleNode)
eagerLockSingleNode
- public Configuration setCacheStopTimeout(int cacheStopTimeout)
public void setUseReplQueue(boolean useReplQueue)
useReplQueue
- public void setIsolationLevel(IsolationLevel isolationLevel)
isolationLevel
- public void setStateRetrievalTimeout(long stateRetrievalTimeout)
stateRetrievalTimeout
- public void setStateRetrievalTimeout(long stateRetrievalTimeout, TimeUnit timeUnit)
public void setStateRetrievalLogFlushTimeout(long logFlushTimeout)
logFlushTimeout
- public void setStateRetrievalLogFlushTimeout(long logFlushTimeout, TimeUnit timeUnit)
public void setStateRetrievalMaxNonProgressingLogWrites(int maxNonProgressingLogWrites)
maxNonProgressingLogWrites
- public void setStateRetrievalInitialRetryWaitTime(long initialRetryWaitTime)
initialRetryWaitTime
- public void setStateRetrievalInitialRetryWaitTime(long initialRetryWaitTime, TimeUnit timeUnit)
public void setStateRetrievalRetryWaitTimeIncreaseFactor(int retryWaitTimeIncreaseFactor)
retryWaitTimeIncreaseFactor
- public void setStateRetrievalNumRetries(int numRetries)
numRetries
- public void setIsolationLevel(String isolationLevel)
public void setUseLazyDeserialization(boolean useLazyDeserialization)
public void setL1CacheEnabled(boolean l1CacheEnabled)
l1CacheEnabled
- public void setL1Lifespan(long l1Lifespan)
l1Lifespan
- public void setL1OnRehash(boolean l1OnRehash)
l1OnRehash
- public void setConsistentHashClass(String consistentHashClass)
consistentHashClass
- public void setHashFunctionClass(String hashFunctionClass)
ConsistentHash
implementations shipped.
hashFunctionClass
- public void setNumOwners(int numOwners)
numOwners
- public void setRehashEnabled(boolean rehashEnabled)
rehashEnabled
- public void setRehashWaitTime(long rehashWaitTime)
public void setUseAsyncMarshalling(boolean useAsyncMarshalling)
useAsyncMarshalling
- public void setIndexingEnabled(boolean enabled)
enabled
- public void setIndexLocalOnly(boolean indexLocalOnly)
indexLocalOnly
- public boolean isUseAsyncMarshalling()
public boolean isUseReplQueue()
public int getReplQueueMaxElements()
public long getReplQueueInterval()
public String getReplQueueClass()
public boolean isExposeJmxStatistics()
public boolean isInvocationBatchingEnabled()
public boolean isIndexingEnabled()
public boolean isIndexLocalOnly()
public boolean isFetchInMemoryState()
public boolean isAlwaysProvideInMemoryState()
public long getLockAcquisitionTimeout()
public long getSyncReplTimeout()
public Configuration.CacheMode getCacheMode()
public IsolationLevel getIsolationLevel()
public String getTransactionManagerLookupClass()
public TransactionManagerLookup getTransactionManagerLookup()
public CacheLoaderManagerConfig getCacheLoaderManagerConfig()
public boolean isSyncCommitPhase()
public boolean isSyncRollbackPhase()
public boolean isUseEagerLocking()
public boolean isEagerLockSingleNode()
public int getCacheStopTimeout()
public long getStateRetrievalTimeout()
public long getStateRetrievalInitialRetryWaitTime()
public int getStateRetrievalRetryWaitTimeIncreaseFactor()
public int getStateRetrievalNumRetries()
public int getStateRetrievalMaxNonProgressingLogWrites()
public long getStateRetrievalLogFlushTimeout()
public boolean isUseLazyDeserialization()
public boolean isL1CacheEnabled()
public long getL1Lifespan()
public boolean isL1OnRehash()
public String getConsistentHashClass()
public String getHashFunctionClass()
public int getNumOwners()
public boolean isRehashEnabled()
public long getRehashWaitTime()
public void accept(ConfigurationBeanVisitor v)
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public Configuration clone()
clone
in interface CloneableConfigurationComponent
clone
in class AbstractNamedCacheConfigurationBean
public boolean isUsingCacheLoaders()
public List<CustomInterceptorConfig> getCustomInterceptors()
CustomInterceptorConfig
, if any, associated with this configuration
object. The custom interceptors will be added to the cache at startup in the sequence defined by this list.
public void setCustomInterceptors(List<CustomInterceptorConfig> customInterceptors)
getCustomInterceptors()
public void assertValid() throws ConfigurationException
ConfigurationException
public boolean isOnePhaseCommit()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |