|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infinispan.spring.support.embedded.InfinispanNamedEmbeddedCacheFactoryBean<K,V>
public class InfinispanNamedEmbeddedCacheFactoryBean<K,V>
A
for creating a
native FactoryBean
named
Infinispan
, delegating to a
org.infinispan.Cache
configurable
. If no cache name is explicitly set,
this org.infinispan.manager.EmbeddedCacheManager
FactoryBean
's
will be used
instead.
beanName
Beyond merely creating named Cache
instances, this FactoryBean
offers
great flexibility in configuring those Caches
. It has setters for all non-global
configuration settings, i.e. all settings that are specific to a single Cache
. The
configuration settings thus defined override those settings obtained from the
EmbeddedCacheManager
.
There are different configuration
that control with what modes
Configuration
to start before further
customizing it as described above:
NONE
: Configuration starts with a new Configuration
instance.
Subsequently, its settings are overridden with those properties that have been explicitly set on
this FactoryBean
. Note that this mode may only be used if no named configuration
having the same name as the Cache
to be created already exists. It is therefore
illegal to use this mode to create a Cache
named, say, "cacheName" if the
configuration file used to configure the EmbeddedCacheManager
contains a
configuration section named "cacheName".DEFAULT
: Configuration starts with the EmbeddedCacheManager
's
default Configuration
instance, i.e. the configuration settings defined in
its configuration file's default section. Subsequently, its settings are overridden with those
properties that have been explicitly set on this FactoryBean
. Note that this mode
may only be used if no named configuration having the same name as the Cache
to be
created already exists. It is therefore illegal to use this mode to create a Cache
named, say, "cacheName" if the configuration file used to configure the
EmbeddedCacheManager
contains a configuration section named "cacheName".NAMED
: Configuration starts with the EmbeddedCacheManager
's
Configuration
instance having the same name as the Cache
to be created.
For a Cache
named, say, "cacheName" this is the configuration section
named "cacheName" as defined in the EmbeddedCacheManager
's configuration
file. Subsequently, its settings are overridden with those properties that have been explicitly
set on this FactoryBean
. Note that this mode is only useful if such a named
configuration section does indeed exist. Otherwise, it is equivalent to using
DEFAULT
.
In addition to creating a named Cache
this FactoryBean
does also
control that Cache
' lifecycle
by shutting
it down when the enclosing Spring application context is closed. It is therefore advisable to
always use this FactoryBean
when creating a named Cache
.
Constructor Summary | |
---|---|
InfinispanNamedEmbeddedCacheFactoryBean()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InfinispanNamedEmbeddedCacheFactoryBean()
Method Detail |
---|
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
InitializingBean.afterPropertiesSet()
public Cache<K,V> getObject() throws Exception
getObject
in interface org.springframework.beans.factory.FactoryBean<Cache<K,V>>
Exception
FactoryBean.getObject()
public Class<? extends Cache> getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean<Cache<K,V>>
FactoryBean.getObjectType()
public boolean isSingleton()
true
.
isSingleton
in interface org.springframework.beans.factory.FactoryBean<Cache<K,V>>
true
FactoryBean.isSingleton()
public void setBeanName(String name)
setBeanName
in interface org.springframework.beans.factory.BeanNameAware
BeanNameAware.setBeanName(java.lang.String)
public void destroy() throws Exception
org.infinispan.Cache
created by this FactoryBean
.
destroy
in interface org.springframework.beans.factory.DisposableBean
Exception
DisposableBean.destroy()
,
Lifecycle.stop()
public void setCacheName(String cacheName)
Sets the name
of the
to be created. If no explicit org.infinispan.Cache
cacheName
is
set, this FactoryBean
will use its
as the beanName
cacheName
.
cacheName
- The name
of the org.infinispan.Cache
to be createdpublic void setInfinispanEmbeddedCacheManager(EmbeddedCacheManager infinispanEmbeddedCacheManager)
Sets the
to be used for creating our
org.infinispan.manager.EmbeddedCacheManager
instance. Note that this is a
mandatory property.
Cache
infinispanEmbeddedCacheManager
- The org.infinispan.manager.EmbeddedCacheManager
to be used for creating
our Cache
instancepublic void setConfigurationTemplateMode(String configurationTemplateMode) throws IllegalArgumentException
configurationTemplateMode
-
IllegalArgumentException
public void setDeadlockDetectionSpinDuration(Long eagerDeadlockSpinDuration)
eagerDeadlockSpinDuration
- ConfigurationOverrides.setDeadlockDetectionSpinDuration(java.lang.Long)
public void setEnableDeadlockDetection(Boolean useEagerDeadlockDetection)
useEagerDeadlockDetection
- ConfigurationOverrides.setEnableDeadlockDetection(java.lang.Boolean)
public void setUseLockStriping(Boolean useLockStriping)
useLockStriping
- ConfigurationOverrides.setUseLockStriping(java.lang.Boolean)
public void setUnsafeUnreliableReturnValues(Boolean unsafeUnreliableReturnValues)
unsafeUnreliableReturnValues
- ConfigurationOverrides.setUnsafeUnreliableReturnValues(java.lang.Boolean)
public void setRehashRpcTimeout(Long rehashRpcTimeout)
rehashRpcTimeout
- ConfigurationOverrides.setRehashRpcTimeout(java.lang.Long)
public void setWriteSkewCheck(Boolean writeSkewCheck)
writeSkewCheck
- ConfigurationOverrides.setWriteSkewCheck(java.lang.Boolean)
public void setConcurrencyLevel(Integer concurrencyLevel)
concurrencyLevel
- ConfigurationOverrides.setConcurrencyLevel(java.lang.Integer)
public void setReplQueueMaxElements(Integer replQueueMaxElements)
replQueueMaxElements
- ConfigurationOverrides.setReplQueueMaxElements(java.lang.Integer)
public void setReplQueueInterval(Long replQueueInterval)
replQueueInterval
- ConfigurationOverrides.setReplQueueInterval(java.lang.Long)
public void setReplQueueClass(String replQueueClass)
replQueueClass
- ConfigurationOverrides.setReplQueueClass(java.lang.String)
public void setExposeJmxStatistics(Boolean exposeJmxStatistics)
exposeJmxStatistics
- ConfigurationOverrides.setExposeJmxStatistics(java.lang.Boolean)
public void setInvocationBatchingEnabled(Boolean invocationBatchingEnabled)
invocationBatchingEnabled
- ConfigurationOverrides.setInvocationBatchingEnabled(java.lang.Boolean)
public void setFetchInMemoryState(Boolean fetchInMemoryState)
fetchInMemoryState
- ConfigurationOverrides.setFetchInMemoryState(java.lang.Boolean)
public void setAlwaysProvideInMemoryState(Boolean alwaysProvideInMemoryState)
alwaysProvideInMemoryState
- ConfigurationOverrides.setAlwaysProvideInMemoryState(java.lang.Boolean)
public void setLockAcquisitionTimeout(Long lockAcquisitionTimeout)
lockAcquisitionTimeout
- ConfigurationOverrides.setLockAcquisitionTimeout(java.lang.Long)
public void setSyncReplTimeout(Long syncReplTimeout)
syncReplTimeout
- ConfigurationOverrides.setSyncReplTimeout(java.lang.Long)
public void setCacheModeString(String cacheModeString)
cacheModeString
- ConfigurationOverrides.setCacheModeString(java.lang.String)
public void setExpirationWakeUpInterval(Long expirationWakeUpInterval)
expirationWakeUpInterval
- ConfigurationOverrides.setExpirationWakeUpInterval(Long)
public void setEvictionStrategy(EvictionStrategy evictionStrategy)
evictionStrategy
- ConfigurationOverrides.setEvictionStrategy(org.infinispan.eviction.EvictionStrategy)
public void setEvictionStrategyClass(String evictionStrategyClass)
evictionStrategyClass
- ConfigurationOverrides.setEvictionStrategyClass(java.lang.String)
public void setEvictionThreadPolicy(EvictionThreadPolicy evictionThreadPolicy)
evictionThreadPolicy
- ConfigurationOverrides.setEvictionThreadPolicy(org.infinispan.eviction.EvictionThreadPolicy)
public void setEvictionThreadPolicyClass(String evictionThreadPolicyClass)
evictionThreadPolicyClass
- ConfigurationOverrides.setEvictionThreadPolicyClass(java.lang.String)
public void setEvictionMaxEntries(Integer evictionMaxEntries)
evictionMaxEntries
- ConfigurationOverrides.setEvictionMaxEntries(java.lang.Integer)
public void setExpirationLifespan(Long expirationLifespan)
expirationLifespan
- ConfigurationOverrides.setExpirationLifespan(java.lang.Long)
public void setExpirationMaxIdle(Long expirationMaxIdle)
expirationMaxIdle
- ConfigurationOverrides.setExpirationMaxIdle(java.lang.Long)
public void setTransactionManagerLookupClass(String transactionManagerLookupClass)
transactionManagerLookupClass
- ConfigurationOverrides.setTransactionManagerLookupClass(java.lang.String)
public void setTransactionManagerLookup(TransactionManagerLookup transactionManagerLookup)
transactionManagerLookup
- ConfigurationOverrides.setTransactionManagerLookup(org.infinispan.transaction.lookup.TransactionManagerLookup)
public void setCacheLoaderManagerConfig(CacheLoaderManagerConfig cacheLoaderManagerConfig)
cacheLoaderManagerConfig
- ConfigurationOverrides.setCacheLoaderManagerConfig(org.infinispan.config.CacheLoaderManagerConfig)
public void setSyncCommitPhase(Boolean syncCommitPhase)
syncCommitPhase
- ConfigurationOverrides.setSyncCommitPhase(java.lang.Boolean)
public void setSyncRollbackPhase(Boolean syncRollbackPhase)
syncRollbackPhase
- ConfigurationOverrides.setSyncRollbackPhase(java.lang.Boolean)
public void setUseEagerLocking(Boolean useEagerLocking)
useEagerLocking
- ConfigurationOverrides.setUseEagerLocking(java.lang.Boolean)
@Deprecated public void setEagerLockSingleNode(Boolean eagerLockSingleNode)
eagerLockSingleNode
- ConfigurationOverrides.setEagerLockSingleNode(java.lang.Boolean)
public void setUseReplQueue(Boolean useReplQueue)
useReplQueue
- ConfigurationOverrides.setUseReplQueue(java.lang.Boolean)
public void setIsolationLevel(IsolationLevel isolationLevel)
isolationLevel
- ConfigurationOverrides.setIsolationLevel(org.infinispan.util.concurrent.IsolationLevel)
public void setStateRetrievalTimeout(Long stateRetrievalTimeout)
stateRetrievalTimeout
- ConfigurationOverrides.setStateRetrievalTimeout(java.lang.Long)
public void setStateRetrievalMaxNonProgressingLogWrites(Integer stateRetrievalMaxNonProgressingLogWrites)
stateRetrievalMaxNonProgressingLogWrites
- ConfigurationOverrides.setStateRetrievalMaxNonProgressingLogWrites(java.lang.Integer)
public void setStateRetrievalChunkSize(Integer stateRetrievalChunkSize)
stateRetrievalChunkSize
- ConfigurationOverrides.setStateRetrievalMaxNonProgressingLogWrites(java.lang.Integer)
public void setStateRetrievalInitialRetryWaitTime(Long stateRetrievalInitialRetryWaitTime)
stateRetrievalInitialRetryWaitTime
- ConfigurationOverrides.setStateRetrievalInitialRetryWaitTime(java.lang.Long)
public void setIsolationLevelClass(String isolationLevelClass)
isolationLevelClass
- ConfigurationOverrides.setIsolationLevelClass(java.lang.String)
public void setUseLazyDeserialization(Boolean useLazyDeserialization)
useLazyDeserialization
- ConfigurationOverrides.setUseLazyDeserialization(java.lang.Boolean)
public void setL1CacheEnabled(Boolean l1CacheEnabled)
l1CacheEnabled
- ConfigurationOverrides.setL1CacheEnabled(java.lang.Boolean)
public void setL1Lifespan(Long l1Lifespan)
l1Lifespan
- ConfigurationOverrides.setL1Lifespan(java.lang.Long)
public void setL1OnRehash(Boolean l1OnRehash)
l1OnRehash
- ConfigurationOverrides.setL1OnRehash(java.lang.Boolean)
public void setConsistentHashClass(String consistentHashClass)
consistentHashClass
- ConfigurationOverrides.setConsistentHashClass(java.lang.String)
public void setNumOwners(Integer numOwners)
numOwners
- ConfigurationOverrides.setNumOwners(java.lang.Integer)
public void setRehashEnabled(Boolean rehashEnabled)
rehashEnabled
- ConfigurationOverrides.setRehashEnabled(java.lang.Boolean)
public void setRehashWaitTime(Long rehashWaitTime)
rehashWaitTime
- ConfigurationOverrides.setRehashWaitTime(java.lang.Long)
public void setUseAsyncMarshalling(Boolean useAsyncMarshalling)
useAsyncMarshalling
- ConfigurationOverrides.setUseAsyncMarshalling(java.lang.Boolean)
public void setIndexingEnabled(Boolean indexingEnabled)
indexingEnabled
- ConfigurationOverrides.setIndexingEnabled(java.lang.Boolean)
public void setIndexLocalOnly(Boolean indexLocalOnly)
indexLocalOnly
- ConfigurationOverrides.setIndexLocalOnly(java.lang.Boolean)
public void setCustomInterceptors(List<CustomInterceptorConfig> customInterceptors)
customInterceptors
- ConfigurationOverrides.setCustomInterceptors(java.util.List)
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |