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, CassandraCacheStoreConfig, 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
overriddenConfigurationElements
 
Constructor Summary
AbstractCacheStoreConfig()
           
 
Method Summary
 void accept(ConfigurationBeanVisitor v)
           
 AsyncStoreConfig asyncStore()
           
 AbstractCacheStoreConfig clone()
           
 boolean equals(Object obj)
           
protected  boolean equalsExcludingProperties(Object obj)
           
 CacheStoreConfig fetchPersistentState(Boolean fetchPersistentState)
          If true, fetch persistent state when joining a cluster.
 AsyncStoreConfig getAsyncStoreConfig()
           
 Integer getPurgerThreads()
           
 SingletonStoreConfig getSingletonStoreConfig()
           
 TypedProperties getTypedProperties()
           
 int hashCode()
           
protected  int hashCodeExcludingProperties()
           
 CacheStoreConfig ignoreModifications(Boolean ignoreModifications)
          If true, any operation that modifies the cache (put, remove, clear, store...etc) won't be applied to the cache store.
 Boolean isFetchPersistentState()
           
 Boolean isIgnoreModifications()
           
 Boolean isPurgeOnStartup()
           
 Boolean isPurgeSynchronously()
           
 CacheStoreConfig purgeOnStartup(Boolean purgeOnStartup)
          If true, purges this cache store when it starts up.
 CacheStoreConfig purgerThreads(Integer purgerThreads)
           
 CacheStoreConfig purgeSynchronously(Boolean purgeSynchronously)
          If true, CacheStore#purgeExpired() call will be done synchronously
 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)
          Deprecated. use purgerThreads(Integer) instead
 void setPurgeSynchronously(Boolean purgeSynchronously)
          If true, CacheStore#purgeExpired() call will be done synchronously
 void setSingletonStoreConfig(SingletonStoreConfig singletonStoreConfig)
           
 void setTypedProperties(TypedProperties tp)
           
 SingletonStoreConfig singletonStore()
           
 String toString()
           
 
Methods inherited from class org.infinispan.loaders.AbstractCacheLoaderConfig
getCacheLoaderClassName, getClassLoader, 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, getClassLoader, 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

asyncStore

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

singletonStore

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

isPurgeSynchronously

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

getPurgerThreads

public Integer getPurgerThreads()
Specified by:
getPurgerThreads in interface CacheStoreConfig

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 -

purgeSynchronously

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

Specified by:
purgeSynchronously in interface CacheStoreConfig
Parameters:
purgeSynchronously -

setPurgerThreads

@Deprecated
public void setPurgerThreads(Integer purgerThreads)
Deprecated. use purgerThreads(Integer) instead

The number of threads to use when purging asynchronously.

Parameters:
purgerThreads -

purgerThreads

public CacheStoreConfig purgerThreads(Integer purgerThreads)
Specified by:
purgerThreads in interface CacheStoreConfig

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 -

fetchPersistentState

public CacheStoreConfig fetchPersistentState(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:
fetchPersistentState 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 -

ignoreModifications

public CacheStoreConfig ignoreModifications(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:
ignoreModifications 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

purgeOnStartup

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

Specified by:
purgeOnStartup in interface CacheStoreConfig
Parameters:
purgeOnStartup -

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 © 2013 JBoss, a division of Red Hat. All Rights Reserved.