org.infinispan.loaders
Class AbstractCacheStoreConfig

java.lang.Object
  extended by org.infinispan.config.AbstractConfigurationBean
      extended by org.infinispan.config.AbstractNamedCacheConfigurationBean
          extended by org.infinispan.loaders.AbstractCacheLoaderConfig
              extended by org.infinispan.loaders.AbstractCacheStoreConfig
All Implemented Interfaces:
Serializable, Cloneable, CloneableConfigurationComponent, JAXBUnmarshallable, CacheLoaderConfig, CacheStoreConfig
Direct Known Subclasses:
BdbjeCacheStoreConfig, LockSupportCacheStoreConfig, RemoteCacheStoreConfig

public class AbstractCacheStoreConfig
extends AbstractCacheLoaderConfig
implements CacheStoreConfig

Configures AbstractCacheStore. This allows you to tune a number of characteristics of the AbstractCacheStore.

Since:
4.0
Author:
Mircea.Markus@jboss.com, Vladimir Blagojevic
See Also:
Configuration reference, Serialized Form

Field Summary
protected  AsyncStoreConfig async
           
protected  Boolean fetchPersistentState
           
protected  Boolean ignoreModifications
           
protected  Boolean purgeOnStartup
           
protected  Integer purgerThreads
           
protected  Boolean purgeSynchronously
           
protected  SingletonStoreConfig singletonStore
           
 
Fields inherited from class org.infinispan.loaders.AbstractCacheLoaderConfig
cacheLoaderClassName, properties
 
Fields inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean
cr
 
Fields inherited from class org.infinispan.config.AbstractConfigurationBean
EMPTY_PROPERTIES, log, overriddenConfigurationElements
 
Constructor Summary
AbstractCacheStoreConfig()
           
 
Method Summary
 void accept(ConfigurationBeanVisitor v)
           
 AbstractCacheStoreConfig clone()
           
 boolean equals(Object obj)
           
protected  boolean equalsExcludingProperties(Object obj)
           
 AsyncStoreConfig getAsyncStoreConfig()
           
 Integer getPurgerThreads()
           
 SingletonStoreConfig getSingletonStoreConfig()
           
 TypedProperties getTypedProperties()
           
 int hashCode()
           
protected  int hashCodeExcludingProperties()
           
 Boolean isFetchPersistentState()
           
 Boolean isIgnoreModifications()
           
 Boolean isPurgeOnStartup()
           
 Boolean isPurgeSynchronously()
           
 void setAsyncStoreConfig(AsyncStoreConfig asyncStoreConfig)
           
 void setFetchPersistentState(Boolean fetchPersistentState)
          If true, fetch persistent state when joining a cluster.
 void setIgnoreModifications(Boolean ignoreModifications)
          If true, any operation that modifies the cache (put, remove, clear, store...etc) won't be applied to the cache store.
 void setPurgeOnStartup(Boolean purgeOnStartup)
          If true, purges this cache store when it starts up.
 void setPurgerThreads(Integer purgerThreads)
          The number of threads to use when purging asynchronously.
 void setPurgeSynchronously(Boolean purgeSynchronously)
          If true, CacheStore#purgeExpired() call will be done synchronously
 void setSingletonStoreConfig(SingletonStoreConfig singletonStoreConfig)
           
 void setTypedProperties(TypedProperties tp)
           
 String toString()
           
 
Methods inherited from class org.infinispan.loaders.AbstractCacheLoaderConfig
getCacheLoaderClassName, getProperties, setCacheLoaderClassName, setProperties, setProperties
 
Methods inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean
hasComponentStarted, inject
 
Methods inherited from class org.infinispan.config.AbstractConfigurationBean
testImmutability, toTypedProperties, toTypedProperties, uc, willUnmarshall
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.infinispan.loaders.CacheLoaderConfig
getCacheLoaderClassName, setCacheLoaderClassName
 

Field Detail

ignoreModifications

protected Boolean ignoreModifications

fetchPersistentState

protected Boolean fetchPersistentState

purgeOnStartup

protected Boolean purgeOnStartup

purgeSynchronously

protected Boolean purgeSynchronously

purgerThreads

protected Integer purgerThreads

singletonStore

protected SingletonStoreConfig singletonStore

async

protected AsyncStoreConfig async
Constructor Detail

AbstractCacheStoreConfig

public AbstractCacheStoreConfig()
Method Detail

isPurgeSynchronously

public Boolean isPurgeSynchronously()
Specified by:
isPurgeSynchronously in interface CacheStoreConfig

getPurgerThreads

public Integer getPurgerThreads()

getTypedProperties

public TypedProperties getTypedProperties()

setTypedProperties

public void setTypedProperties(TypedProperties tp)

setPurgeSynchronously

public void setPurgeSynchronously(Boolean purgeSynchronously)
If true, CacheStore#purgeExpired() call will be done synchronously

Specified by:
setPurgeSynchronously in interface CacheStoreConfig
Parameters:
purgeSynchronously -

setPurgerThreads

public void setPurgerThreads(Integer purgerThreads)
The number of threads to use when purging asynchronously.

Parameters:
purgerThreads -

isFetchPersistentState

public Boolean isFetchPersistentState()
Specified by:
isFetchPersistentState in interface CacheStoreConfig

setFetchPersistentState

public void setFetchPersistentState(Boolean fetchPersistentState)
If true, fetch persistent state when joining a cluster. If multiple cache stores are chained, only one of them can have this property enabled. Persistent state transfer with a shared cache store does not make sense, as the same persistent store that provides the data will just end up receiving it. Therefore, if a shared cache store is used, the cache will not allow a persistent state transfer even if a cache store has this property set to true. Finally, setting it to true only makes sense if in a clustered environment, and only 'replication' and 'invalidation' cluster modes are supported.

Specified by:
setFetchPersistentState in interface CacheStoreConfig
Parameters:
fetchPersistentState -

setIgnoreModifications

public void setIgnoreModifications(Boolean ignoreModifications)
If true, any operation that modifies the cache (put, remove, clear, store...etc) won't be applied to the cache store. This means that the cache store could become out of sync with the cache.

Specified by:
setIgnoreModifications in interface CacheStoreConfig
Parameters:
ignoreModifications -

isIgnoreModifications

public Boolean isIgnoreModifications()
Specified by:
isIgnoreModifications in interface CacheStoreConfig

isPurgeOnStartup

public Boolean isPurgeOnStartup()
Specified by:
isPurgeOnStartup in interface CacheStoreConfig

setPurgeOnStartup

public void setPurgeOnStartup(Boolean purgeOnStartup)
If true, purges this cache store when it starts up.

Specified by:
setPurgeOnStartup in interface CacheStoreConfig
Parameters:
purgeOnStartup -

getSingletonStoreConfig

public SingletonStoreConfig getSingletonStoreConfig()
Specified by:
getSingletonStoreConfig in interface CacheStoreConfig

setSingletonStoreConfig

public void setSingletonStoreConfig(SingletonStoreConfig singletonStoreConfig)
Specified by:
setSingletonStoreConfig in interface CacheStoreConfig

getAsyncStoreConfig

public AsyncStoreConfig getAsyncStoreConfig()
Specified by:
getAsyncStoreConfig in interface CacheStoreConfig

setAsyncStoreConfig

public void setAsyncStoreConfig(AsyncStoreConfig asyncStoreConfig)
Specified by:
setAsyncStoreConfig in interface CacheStoreConfig

accept

public void accept(ConfigurationBeanVisitor v)
Specified by:
accept in interface CacheLoaderConfig
Overrides:
accept in class AbstractCacheLoaderConfig

equals

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

equalsExcludingProperties

protected boolean equalsExcludingProperties(Object obj)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

hashCodeExcludingProperties

protected int hashCodeExcludingProperties()

toString

public String toString()
Overrides:
toString in class Object

clone

public AbstractCacheStoreConfig clone()
Specified by:
clone in interface CloneableConfigurationComponent
Specified by:
clone in interface CacheLoaderConfig
Overrides:
clone in class AbstractCacheLoaderConfig


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