org.infinispan.config
Class Configuration

java.lang.Object
  extended by org.infinispan.config.AbstractConfigurationBean
      extended by org.infinispan.config.AbstractNamedCacheConfigurationBean
          extended by org.infinispan.config.Configuration
All Implemented Interfaces:
Serializable, Cloneable, CloneableConfigurationComponent, JAXBUnmarshallable

public class Configuration
extends AbstractNamedCacheConfigurationBean

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.

Since:
4.0
Author:
Manik Surtani (manik@jboss.org), Vladimir Blagojevic, Galder ZamarreƱo, Mircea.Markus@jboss.com
See Also:
Configuration reference, Serialized Form

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 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()
           
 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)
           
 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 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

name

protected String name
Constructor Detail

Configuration

public Configuration()
Method Detail

applyOverrides

public void applyOverrides(Configuration overrides)

inject

public void inject(ComponentRegistry cr)
Overrides:
inject in class AbstractNamedCacheConfigurationBean

getGlobalConfiguration

public GlobalConfiguration getGlobalConfiguration()

setGlobalConfiguration

public void setGlobalConfiguration(GlobalConfiguration gc)

getName

public String getName()

isStateTransferEnabled

public boolean isStateTransferEnabled()

getDeadlockDetectionSpinDuration

public long getDeadlockDetectionSpinDuration()

setDeadlockDetectionSpinDuration

public void setDeadlockDetectionSpinDuration(long eagerDeadlockSpinDuration)
Time period that determines how often is lock acquisition attempted within maximum time allowed to acquire a particular lock

Parameters:
eagerDeadlockSpinDuration -

isEnableDeadlockDetection

public boolean isEnableDeadlockDetection()

setEnableDeadlockDetection

public void setEnableDeadlockDetection(boolean useEagerDeadlockDetection)
Toggle to enable/disable deadlock detection

Parameters:
useEagerDeadlockDetection -

setUseLockStriping

public void setUseLockStriping(boolean useLockStriping)
If true, a pool of shared locks is maintained for all entries that need to be locked. Otherwise, a lock is created per entry in the cache. Lock striping helps control memory footprint but may reduce concurrency in the system.

Parameters:
useLockStriping -

isUseLockStriping

public boolean isUseLockStriping()

isUnsafeUnreliableReturnValues

public boolean isUnsafeUnreliableReturnValues()

setUnsafeUnreliableReturnValues

public void setUnsafeUnreliableReturnValues(boolean unsafeUnreliableReturnValues)
Toggle to enable/disable return value fetching

Parameters:
unsafeUnreliableReturnValues -

setRehashRpcTimeout

public void setRehashRpcTimeout(long rehashRpcTimeout)
Rehashing timeout

Parameters:
rehashRpcTimeout -

getRehashRpcTimeout

public long getRehashRpcTimeout()

isWriteSkewCheck

public boolean isWriteSkewCheck()

setWriteSkewCheck

public void setWriteSkewCheck(boolean writeSkewCheck)
This setting is only applicable in the case of REPEATABLE_READ. When write skew check is set to false, if the writer at commit time discovers that the working entry and the underlying entry have different versions, the working entry will overwrite the underlying entry. If true, such version conflict - known as a write-skew - will throw an Exception.

Parameters:
writeSkewCheck -

getConcurrencyLevel

public int getConcurrencyLevel()

setConcurrencyLevel

public void setConcurrencyLevel(int concurrencyLevel)
Concurrency level for lock containers. Adjust this value according to the number of concurrent threads interating with Infinispan. Similar to the concurrencyLevel tuning parameter seen in the JDK's ConcurrentHashMap.

Parameters:
concurrencyLevel -

setReplQueueMaxElements

public 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.

Parameters:
replQueueMaxElements -

setReplQueueInterval

public 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. This should be a positive integer which represents thread wakeup time in milliseconds.

Parameters:
replQueueInterval -

setReplQueueInterval

public void setReplQueueInterval(long replQueueInterval,
                                 TimeUnit timeUnit)

setReplQueueClass

public void setReplQueueClass(String classname)
This overrides the replication queue implementation class. Overriding the default allows you to add behavior to the queue, typically by subclassing the default implementation.

Parameters:
classname -

setExposeJmxStatistics

public void setExposeJmxStatistics(boolean useMbean)

setInvocationBatchingEnabled

public void setInvocationBatchingEnabled(boolean enabled)
Enables invocation batching if set to true. You still need to use Cache.startBatch() and Cache.endBatch(boolean) to demarcate the start and end of batches.

Parameters:
enabled - if true, batching is enabled.
Since:
4.0

setFetchInMemoryState

public 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.

Parameters:
fetchInMemoryState -

setAlwaysProvideInMemoryState

public 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)

Parameters:
alwaysProvideInMemoryState -

setLockAcquisitionTimeout

public void setLockAcquisitionTimeout(long lockAcquisitionTimeout)
Maximum time to attempt a particular lock acquisition

Parameters:
lockAcquisitionTimeout -

setLockAcquisitionTimeout

public void setLockAcquisitionTimeout(long lockAcquisitionTimeout,
                                      TimeUnit timeUnit)
Maximum time to attempt a particular lock acquisition

Parameters:
lockAcquisitionTimeout -
timeUnit -

setSyncReplTimeout

public 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.

Parameters:
syncReplTimeout -

setSyncReplTimeout

public 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.

Parameters:
syncReplTimeout -
timeUnit -

setCacheMode

public void setCacheMode(Configuration.CacheMode cacheModeInt)
Cache mode. For distribution, set mode to either 'd', 'dist' or 'distribution'. For replication, use either 'r', 'repl' or 'replication'. Finally, for invalidation, 'i', 'inv' or 'invalidation'.


setCacheMode

public void setCacheMode(String cacheMode)
Cache mode. For distribution, set mode to either 'd', 'dist' or 'distribution'. For replication, use either 'r', 'repl' or 'replication'. Finally, for invalidation, 'i', 'inv' or 'invalidation'.

Parameters:
cacheMode -

getCacheModeString

public String getCacheModeString()

setCacheModeString

public void setCacheModeString(String cacheMode)

getEvictionWakeUpInterval

public long getEvictionWakeUpInterval()
Eviction thread wake up interval, in milliseconds.


setEvictionWakeUpInterval

public void setEvictionWakeUpInterval(long evictionWakeUpInterval)
Interval between subsequent eviction runs, in milliseconds. If you wish to disable the periodic eviction process altogether, set wakeupInterval to -1.

Parameters:
evictionWakeUpInterval -

getEvictionStrategy

public EvictionStrategy getEvictionStrategy()

setEvictionStrategy

public void setEvictionStrategy(EvictionStrategy evictionStrategy)
Eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU' and 'NONE' (to disable eviction).

Parameters:
evictionStrategy -

setEvictionStrategy

public void setEvictionStrategy(String eStrategy)
Eviction strategy. Available options are 'UNORDERED', 'FIFO', 'LRU' and 'NONE' (to disable eviction).

Parameters:
eStrategy -

getEvictionThreadPolicy

public EvictionThreadPolicy getEvictionThreadPolicy()

setEvictionThreadPolicy

public void setEvictionThreadPolicy(EvictionThreadPolicy policy)
Threading policy for eviction.

Parameters:
policy -

setEvictionThreadPolicy

public void setEvictionThreadPolicy(String policy)
Threading policy for eviction.

Parameters:
policy -

getEvictionMaxEntries

public int getEvictionMaxEntries()

setEvictionMaxEntries

public void setEvictionMaxEntries(int evictionMaxEntries)
Maximum number of entries in a cache instance. If selected value is not a power of two the actual value will default to the least power of two larger than selected value. -1 means no limit.

Parameters:
evictionMaxEntries -

getExpirationLifespan

public long getExpirationLifespan()
Expiration lifespan, in milliseconds


setExpirationLifespan

public void setExpirationLifespan(long expirationLifespan)
Maximum lifespan of a cache entry, after which the entry is expired cluster-wide, in milliseconds. -1 means the entries never expire.

Note that this can be overriden on a per-entry bassi by using the Cache API.

Parameters:
expirationLifespan -

getExpirationMaxIdle

public long getExpirationMaxIdle()
Expiration max idle time, in milliseconds


setExpirationMaxIdle

public void setExpirationMaxIdle(long expirationMaxIdle)
Maximum idle time a cache entry will be maintained in the cache, in milliseconds. If the idle time is exceeded, the entry will be expired cluster-wide. -1 means the entries never expire.

Note that this can be overriden on a per-entry bassi by using the Cache API.

Parameters:
expirationMaxIdle -

setTransactionManagerLookupClass

public void setTransactionManagerLookupClass(String transactionManagerLookupClass)
Fully qualified class name of a class that looks up a reference to a TransactionManager. The default provided is capable of locating the default TransactionManager in most popular Java EE systems, using a JNDI lookup.

Parameters:
transactionManagerLookupClass -

setTransactionManagerLookup

public void setTransactionManagerLookup(TransactionManagerLookup transactionManagerLookup)

setCacheLoaderManagerConfig

public void setCacheLoaderManagerConfig(CacheLoaderManagerConfig cacheLoaderManagerConfig)

setSyncCommitPhase

public 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. Otherwise, the commit phase will be asynchronous. Keeping it as false improves performance of 2PC transactions, since any remote failures are trapped during the prepare phase anyway and appropriate rollbacks are issued.

Parameters:
syncCommitPhase -

setSyncRollbackPhase

public 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. Otherwise, the rollback phase will be asynchronous. Keeping it as false improves performance of 2PC transactions.

Parameters:
syncRollbackPhase -

setUseEagerLocking

public void setUseEagerLocking(boolean useEagerLocking)
Only has effect for DIST mode and when useEagerLocking is set to true. When this is enabled, then only one node is locked in the cluster, disregarding numOwners config. On the opposite, if this is false, then on all cache.lock() calls numOwners RPCs are being performed. The node that gets locked is the main data owner, i.e. the node where data would reside if numOwners==1. If the node where the lock resides crashes, then the transaction is marked for rollback - data is in a consistent state, no fault tolerance.

Parameters:
useEagerLocking -

setEagerLockSingleNode

public void setEagerLockSingleNode(boolean eagerLockSingleNode)
Only has effect for DIST mode and when useEagerLocking is set to true. When this is enabled, then only one node is locked in the cluster, disregarding numOwners config. On the opposite, if this is false, then on all cache.lock() calls numOwners RPCs are being performed. The node that gets locked is the main data owner, i.e. the node where data would reside if numOwners==1. If the node where the lock resides crashes, then the transaction is marked for rollback - data is in a consistent state, no fault tolerance.

Parameters:
eagerLockSingleNode -

setUseReplQueue

public void setUseReplQueue(boolean useReplQueue)
If true, this forces all async communications to be queued up and sent out periodically as a batch.

Parameters:
useReplQueue -

setIsolationLevel

public void setIsolationLevel(IsolationLevel isolationLevel)
Cache isolation level. Infinispan only supports READ_COMMITTED or REPEATABLE_READ isolation levels. See http://en.wikipedia.org/wiki/Isolation_level for a discussion on isolation levels.

Parameters:
isolationLevel -

setStateRetrievalTimeout

public 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.

Parameters:
stateRetrievalTimeout -

setStateRetrievalTimeout

public void setStateRetrievalTimeout(long stateRetrievalTimeout,
                                     TimeUnit timeUnit)

setStateRetrievalLogFlushTimeout

public void setStateRetrievalLogFlushTimeout(long logFlushTimeout)
This is the maximum amount of time to run a cluster-wide flush, to allow for syncing of transaction logs.

Parameters:
logFlushTimeout -

setStateRetrievalLogFlushTimeout

public void setStateRetrievalLogFlushTimeout(long logFlushTimeout,
                                             TimeUnit timeUnit)

setStateRetrievalMaxNonProgressingLogWrites

public 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.

Parameters:
maxNonProgressingLogWrites -

setStateRetrievalInitialRetryWaitTime

public void setStateRetrievalInitialRetryWaitTime(long initialRetryWaitTime)
Initial wait time when backing off before retrying state transfer retrieval

Parameters:
initialRetryWaitTime -

setStateRetrievalInitialRetryWaitTime

public void setStateRetrievalInitialRetryWaitTime(long initialRetryWaitTime,
                                                  TimeUnit timeUnit)

setStateRetrievalRetryWaitTimeIncreaseFactor

public void setStateRetrievalRetryWaitTimeIncreaseFactor(int retryWaitTimeIncreaseFactor)
Wait time increase factor over successive state retrieval backoffs

Parameters:
retryWaitTimeIncreaseFactor -

setStateRetrievalNumRetries

public void setStateRetrievalNumRetries(int numRetries)
Number of state retrieval retries before giving up and aborting startup.

Parameters:
numRetries -

setIsolationLevel

public void setIsolationLevel(String isolationLevel)

setUseLazyDeserialization

public void setUseLazyDeserialization(boolean useLazyDeserialization)

setL1CacheEnabled

public void setL1CacheEnabled(boolean l1CacheEnabled)
Toggle to enable/disable L1 cache.

Parameters:
l1CacheEnabled -

setL1Lifespan

public void setL1Lifespan(long l1Lifespan)
Maximum lifespan of an entry placed in the L1 cache.

Parameters:
l1Lifespan -

setL1OnRehash

public void setL1OnRehash(boolean l1OnRehash)
If true, entries removed due to a rehash will be moved to L1 rather than being removed altogether.

Parameters:
l1OnRehash -

setConsistentHashClass

public void setConsistentHashClass(String consistentHashClass)
Fully qualified name of class providing consistent hash algorithm

Parameters:
consistentHashClass -

setNumOwners

public void setNumOwners(int numOwners)
Number of cluster-wide replicas for each cache entry.

Parameters:
numOwners -

setRehashEnabled

public void setRehashEnabled(boolean rehashEnabled)
If false, no rebalancing or rehashing will take place when a new node joins the cluster or a node leaves

Parameters:
rehashEnabled -

setRehashWaitTime

public void setRehashWaitTime(long rehashWaitTime)

setUseAsyncMarshalling

public 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. You can find more information here

Parameters:
useAsyncMarshalling -

setIndexingEnabled

public void setIndexingEnabled(boolean enabled)
If enabled, entries will be indexed when they are added to the cache. Indexes will be updated as entries change or are removed.

Parameters:
enabled -

setIndexLocalOnly

public void setIndexLocalOnly(boolean indexLocalOnly)
If true, only index changes made locally, ignoring remote changes. This is useful if indexes are shared across a cluster to prevent redundant indexing of updates.

Parameters:
indexLocalOnly -

isUseAsyncMarshalling

public boolean isUseAsyncMarshalling()

isUseReplQueue

public boolean isUseReplQueue()

getReplQueueMaxElements

public int getReplQueueMaxElements()

getReplQueueInterval

public long getReplQueueInterval()

getReplQueueClass

public String getReplQueueClass()

isExposeJmxStatistics

public boolean isExposeJmxStatistics()

isInvocationBatchingEnabled

public boolean isInvocationBatchingEnabled()
Returns:
true if invocation batching is enabled.
Since:
4.0

isIndexingEnabled

public boolean isIndexingEnabled()

isIndexLocalOnly

public boolean isIndexLocalOnly()

isFetchInMemoryState

public boolean isFetchInMemoryState()

isAlwaysProvideInMemoryState

public boolean isAlwaysProvideInMemoryState()

getLockAcquisitionTimeout

public long getLockAcquisitionTimeout()

getSyncReplTimeout

public long getSyncReplTimeout()

getCacheMode

public Configuration.CacheMode getCacheMode()

getIsolationLevel

public IsolationLevel getIsolationLevel()

getTransactionManagerLookupClass

public String getTransactionManagerLookupClass()

getTransactionManagerLookup

public TransactionManagerLookup getTransactionManagerLookup()

getCacheLoaderManagerConfig

public CacheLoaderManagerConfig getCacheLoaderManagerConfig()

isSyncCommitPhase

public boolean isSyncCommitPhase()

isSyncRollbackPhase

public boolean isSyncRollbackPhase()

isUseEagerLocking

public boolean isUseEagerLocking()

isEagerLockSingleNode

public boolean isEagerLockSingleNode()

getStateRetrievalTimeout

public long getStateRetrievalTimeout()

getStateRetrievalInitialRetryWaitTime

public long getStateRetrievalInitialRetryWaitTime()

getStateRetrievalRetryWaitTimeIncreaseFactor

public int getStateRetrievalRetryWaitTimeIncreaseFactor()

getStateRetrievalNumRetries

public int getStateRetrievalNumRetries()

getStateRetrievalMaxNonProgressingLogWrites

public int getStateRetrievalMaxNonProgressingLogWrites()

getStateRetrievalLogFlushTimeout

public long getStateRetrievalLogFlushTimeout()

isUseLazyDeserialization

public boolean isUseLazyDeserialization()

isL1CacheEnabled

public boolean isL1CacheEnabled()

getL1Lifespan

public long getL1Lifespan()

isL1OnRehash

public boolean isL1OnRehash()

getConsistentHashClass

public String getConsistentHashClass()

getNumOwners

public int getNumOwners()

isRehashEnabled

public boolean isRehashEnabled()

getRehashWaitTime

public long getRehashWaitTime()

accept

public void accept(ConfigurationBeanVisitor v)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

clone

public Configuration clone()
Specified by:
clone in interface CloneableConfigurationComponent
Overrides:
clone in class AbstractNamedCacheConfigurationBean

isUsingCacheLoaders

public boolean isUsingCacheLoaders()

getCustomInterceptors

public List<CustomInterceptorConfig> getCustomInterceptors()
Returns the 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.

Returns:
List of cutom interceptors, never null

setCustomInterceptors

public void setCustomInterceptors(List<CustomInterceptorConfig> customInterceptors)
See Also:
getCustomInterceptors()

assertValid

public void assertValid()
                 throws ConfigurationException
Throws:
ConfigurationException

isOnePhaseCommit

public boolean isOnePhaseCommit()

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.