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

public class Configuration
extends AbstractNamedCacheConfigurationBean

Encapsulates the configuration of a Cache.

Note that class Configuration contains JAXB annotations. These annotations determine how XML configuration files are read into instances of configuration class hierarchy as well as they provide meta data for configuration file XML schema generation. Please modify these annotations and Java element types they annotate with utmost understanding and care.

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

Nested Class Summary
static class Configuration.AsyncType
           
static class Configuration.BooleanAttributeType
           
static class Configuration.CacheMode
          Cache replication mode.
static class Configuration.ClusteringType
           
static class Configuration.ClusteringTypeAdapter
           
static class Configuration.CustomInterceptorsType
           
static class Configuration.DeadlockDetectionType
           
static class Configuration.EvictionType
           
static class Configuration.ExpirationType
           
static class Configuration.HashType
           
static class Configuration.InvocationBatching
           
static class Configuration.JmxStatistics
           
static class Configuration.L1Type
           
static class Configuration.LazyDeserialization
           
static class Configuration.LockingType
           
static class Configuration.QueryConfigurationBean
           
static class Configuration.StateRetrievalType
           
static class Configuration.SyncType
           
static class Configuration.TransactionType
           
static class Configuration.UnsafeType
           
 
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()
           
 long getEvictionWakeUpInterval()
           
 long getExpirationLifespan()
           
 long getExpirationMaxIdle()
           
 GlobalConfiguration getGlobalConfiguration()
           
 IsolationLevel getIsolationLevel()
           
 long getL1Lifespan()
           
 long getLockAcquisitionTimeout()
           
 String getName()
           
 int getNumOwners()
           
 long getRehashRpcTimeout()
           
 long getRehashWaitTime()
           
 long getReplQueueInterval()
           
 int getReplQueueMaxElements()
           
 long getStateRetrievalInitialRetryWaitTime()
           
 int getStateRetrievalNumRetries()
           
 int getStateRetrievalRetryWaitTimeIncreaseFactor()
           
 long getStateRetrievalTimeout()
           
 long getSyncReplTimeout()
           
 TransactionManagerLookup getTransactionManagerLookup()
           
 String getTransactionManagerLookupClass()
           
 int hashCode()
           
 void inject(ComponentRegistry cr)
           
 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 setCacheLoaderManagerConfig(CacheLoaderManagerConfig cacheLoaderManagerConfig)
           
 void setCacheMode(Configuration.CacheMode cacheModeInt)
           
 void setCacheMode(String cacheMode)
           
 void setCacheModeString(String cacheMode)
           
 void setConcurrencyLevel(int concurrencyLevel)
           
 void setConsistentHashClass(String consistentHashClass)
           
 void setCustomInterceptors(List<CustomInterceptorConfig> customInterceptors)
           
 void setDeadlockDetectionSpinDuration(long eagerDeadlockSpinDuration)
           
 void setEnableDeadlockDetection(boolean useEagerDeadlockDetection)
           
 void setEvictionMaxEntries(int evictionMaxEntries)
           
 void setEvictionStrategy(EvictionStrategy evictionStrategy)
           
 void setEvictionStrategy(String eStrategy)
           
 void setEvictionWakeUpInterval(long evictionWakeUpInterval)
           
 void setExpirationLifespan(long expirationLifespan)
           
 void setExpirationMaxIdle(long expirationMaxIdle)
           
 void setExposeJmxStatistics(boolean useMbean)
           
 void setFetchInMemoryState(boolean fetchInMemoryState)
           
 void setGlobalConfiguration(GlobalConfiguration gc)
           
 void setIndexingEnabled(boolean enabled)
           
 void setIndexLocalOnly(boolean indexLocalOnly)
           
 void setInvocationBatchingEnabled(boolean enabled)
          Enables invocation batching if set to true.
 void setIsolationLevel(IsolationLevel isolationLevel)
           
 void setIsolationLevel(String isolationLevel)
           
 void setL1CacheEnabled(boolean l1CacheEnabled)
           
 void setL1Lifespan(long l1Lifespan)
           
 void setL1OnRehash(boolean l1OnRehash)
           
 void setLockAcquisitionTimeout(long lockAcquisitionTimeout)
           
 void setLockAcquisitionTimeout(long lockAcquisitionTimeout, TimeUnit timeUnit)
           
 void setNumOwners(int numOwners)
           
 void setRehashEnabled(boolean rehashEnabled)
           
 void setRehashRpcTimeout(long rehashRpcTimeout)
           
 void setRehashWaitTime(long rehashWaitTime)
           
 void setReplQueueInterval(long replQueueInterval)
           
 void setReplQueueInterval(long replQueueInterval, TimeUnit timeUnit)
           
 void setReplQueueMaxElements(int replQueueMaxElements)
           
 void setStateRetrievalInitialRetryWaitTime(long initialRetryWaitTime)
           
 void setStateRetrievalInitialRetryWaitTime(long initialRetryWaitTime, TimeUnit timeUnit)
           
 void setStateRetrievalNumRetries(int numRetries)
           
 void setStateRetrievalRetryWaitTimeIncreaseFactor(int retryWaitTimeIncreaseFactor)
           
 void setStateRetrievalTimeout(long stateRetrievalTimeout)
           
 void setStateRetrievalTimeout(long stateRetrievalTimeout, TimeUnit timeUnit)
           
 void setSyncCommitPhase(boolean syncCommitPhase)
           
 void setSyncReplTimeout(long syncReplTimeout)
           
 void setSyncReplTimeout(long syncReplTimeout, TimeUnit timeUnit)
           
 void setSyncRollbackPhase(boolean syncRollbackPhase)
           
 void setTransactionManagerLookup(TransactionManagerLookup transactionManagerLookup)
           
 void setTransactionManagerLookupClass(String transactionManagerLookupClass)
           
 void setUnsafeUnreliableReturnValues(boolean unsafeUnreliableReturnValues)
           
 void setUseAsyncMarshalling(boolean useAsyncMarshalling)
           
 void setUseEagerLocking(boolean useEagerLocking)
           
 void setUseLazyDeserialization(boolean useLazyDeserialization)
           
 void setUseLockStriping(boolean useLockStriping)
           
 void setUseReplQueue(boolean useReplQueue)
           
 void setWriteSkewCheck(boolean writeSkewCheck)
           
 
Methods inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean
hasComponentStarted
 
Methods inherited from class org.infinispan.config.AbstractConfigurationBean
testImmutability, toTypedProperties, toTypedProperties, uc
 
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)

isEnableDeadlockDetection

public boolean isEnableDeadlockDetection()

setEnableDeadlockDetection

public void setEnableDeadlockDetection(boolean useEagerDeadlockDetection)

setUseLockStriping

public void setUseLockStriping(boolean useLockStriping)

isUseLockStriping

public boolean isUseLockStriping()

isUnsafeUnreliableReturnValues

public boolean isUnsafeUnreliableReturnValues()

setUnsafeUnreliableReturnValues

public void setUnsafeUnreliableReturnValues(boolean unsafeUnreliableReturnValues)

setRehashRpcTimeout

public void setRehashRpcTimeout(long rehashRpcTimeout)

getRehashRpcTimeout

public long getRehashRpcTimeout()

isWriteSkewCheck

public boolean isWriteSkewCheck()

setWriteSkewCheck

public void setWriteSkewCheck(boolean writeSkewCheck)

getConcurrencyLevel

public int getConcurrencyLevel()

setConcurrencyLevel

public void setConcurrencyLevel(int concurrencyLevel)

setReplQueueMaxElements

public void setReplQueueMaxElements(int replQueueMaxElements)

setReplQueueInterval

public void setReplQueueInterval(long replQueueInterval)

setReplQueueInterval

public void setReplQueueInterval(long replQueueInterval,
                                 TimeUnit timeUnit)

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)

setLockAcquisitionTimeout

public void setLockAcquisitionTimeout(long lockAcquisitionTimeout)

setLockAcquisitionTimeout

public void setLockAcquisitionTimeout(long lockAcquisitionTimeout,
                                      TimeUnit timeUnit)

setSyncReplTimeout

public void setSyncReplTimeout(long syncReplTimeout)

setSyncReplTimeout

public void setSyncReplTimeout(long syncReplTimeout,
                               TimeUnit timeUnit)

setCacheMode

public void setCacheMode(Configuration.CacheMode cacheModeInt)

setCacheMode

public void setCacheMode(String cacheMode)

getCacheModeString

public String getCacheModeString()

setCacheModeString

public void setCacheModeString(String cacheMode)

getEvictionWakeUpInterval

public long getEvictionWakeUpInterval()

setEvictionWakeUpInterval

public void setEvictionWakeUpInterval(long evictionWakeUpInterval)

getEvictionStrategy

public EvictionStrategy getEvictionStrategy()

setEvictionStrategy

public void setEvictionStrategy(EvictionStrategy evictionStrategy)

setEvictionStrategy

public void setEvictionStrategy(String eStrategy)

getEvictionMaxEntries

public int getEvictionMaxEntries()

setEvictionMaxEntries

public void setEvictionMaxEntries(int evictionMaxEntries)

getExpirationLifespan

public long getExpirationLifespan()

setExpirationLifespan

public void setExpirationLifespan(long expirationLifespan)

getExpirationMaxIdle

public long getExpirationMaxIdle()

setExpirationMaxIdle

public void setExpirationMaxIdle(long expirationMaxIdle)

setTransactionManagerLookupClass

public void setTransactionManagerLookupClass(String transactionManagerLookupClass)

setTransactionManagerLookup

public void setTransactionManagerLookup(TransactionManagerLookup transactionManagerLookup)

setCacheLoaderManagerConfig

public void setCacheLoaderManagerConfig(CacheLoaderManagerConfig cacheLoaderManagerConfig)

setSyncCommitPhase

public void setSyncCommitPhase(boolean syncCommitPhase)

setSyncRollbackPhase

public void setSyncRollbackPhase(boolean syncRollbackPhase)

setUseEagerLocking

public void setUseEagerLocking(boolean useEagerLocking)

setUseReplQueue

public void setUseReplQueue(boolean useReplQueue)

setIsolationLevel

public void setIsolationLevel(IsolationLevel isolationLevel)

setStateRetrievalTimeout

public void setStateRetrievalTimeout(long stateRetrievalTimeout)

setStateRetrievalTimeout

public void setStateRetrievalTimeout(long stateRetrievalTimeout,
                                     TimeUnit timeUnit)

setStateRetrievalInitialRetryWaitTime

public void setStateRetrievalInitialRetryWaitTime(long initialRetryWaitTime)

setStateRetrievalInitialRetryWaitTime

public void setStateRetrievalInitialRetryWaitTime(long initialRetryWaitTime,
                                                  TimeUnit timeUnit)

setStateRetrievalRetryWaitTimeIncreaseFactor

public void setStateRetrievalRetryWaitTimeIncreaseFactor(int retryWaitTimeIncreaseFactor)

setStateRetrievalNumRetries

public void setStateRetrievalNumRetries(int numRetries)

setIsolationLevel

public void setIsolationLevel(String isolationLevel)

setUseLazyDeserialization

public void setUseLazyDeserialization(boolean useLazyDeserialization)

setL1CacheEnabled

public void setL1CacheEnabled(boolean l1CacheEnabled)

setL1Lifespan

public void setL1Lifespan(long l1Lifespan)

setL1OnRehash

public void setL1OnRehash(boolean l1OnRehash)

setConsistentHashClass

public void setConsistentHashClass(String consistentHashClass)

setNumOwners

public void setNumOwners(int numOwners)

setRehashEnabled

public void setRehashEnabled(boolean rehashEnabled)

setRehashWaitTime

public void setRehashWaitTime(long rehashWaitTime)

setUseAsyncMarshalling

public void setUseAsyncMarshalling(boolean useAsyncMarshalling)

setIndexingEnabled

public void setIndexingEnabled(boolean enabled)

setIndexLocalOnly

public void setIndexLocalOnly(boolean indexLocalOnly)

isUseAsyncMarshalling

public boolean isUseAsyncMarshalling()

isUseReplQueue

public boolean isUseReplQueue()

getReplQueueMaxElements

public int getReplQueueMaxElements()

getReplQueueInterval

public long getReplQueueInterval()

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

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

getStateRetrievalTimeout

public long getStateRetrievalTimeout()

getStateRetrievalInitialRetryWaitTime

public long getStateRetrievalInitialRetryWaitTime()

getStateRetrievalRetryWaitTimeIncreaseFactor

public int getStateRetrievalRetryWaitTimeIncreaseFactor()

getStateRetrievalNumRetries

public int getStateRetrievalNumRetries()

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.