org.infinispan.loaders.decorators
Class AsyncStoreConfig

java.lang.Object
  extended by org.infinispan.config.AbstractConfigurationBean
      extended by org.infinispan.config.AbstractNamedCacheConfigurationBean
          extended by org.infinispan.loaders.decorators.AbstractDecoratorConfigurationBean
              extended by org.infinispan.loaders.decorators.AsyncStoreConfig
All Implemented Interfaces:
Serializable, Cloneable, CloneableConfigurationComponent, JAXBUnmarshallable, CacheLoaderConfig, CacheStoreConfig

public class AsyncStoreConfig
extends AbstractDecoratorConfigurationBean

Configuration for the async cache loader. If enabled, this provides you with asynchronous writes to the cache store, giving you 'write-behind' caching.

Since:
4.0
Author:
Manik Surtani, Vladimir Blagojevic
See Also:
Configuration reference, Serialized Form

Field Summary
protected  Boolean enabled
           
protected  Long flushLockTimeout
           
protected  Long shutdownTimeout
           
protected  Integer threadPoolSize
           
 
Fields inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean
cr
 
Fields inherited from class org.infinispan.config.AbstractConfigurationBean
overriddenConfigurationElements
 
Constructor Summary
AsyncStoreConfig()
           
 
Method Summary
 void accept(ConfigurationBeanVisitor v)
           
 AsyncStoreConfig clone()
           
 AsyncStoreConfig flushLockTimeout(Long stateLockTimeout)
          Timeout to acquire the lock which guards the state to be flushed to the cache store periodically.
 Long getFlushLockTimeout()
           
 Long getShutdownTimeout()
           
 Integer getThreadPoolSize()
           
 Boolean isEnabled()
           
 void setEnabled(Boolean enabled)
          Deprecated. The visibility of this method will be reduced in favour of more fluent writer method calls.
 AsyncStoreConfig setFlushLockTimeout(Long stateLockTimeout)
          Deprecated. The visibility of this method will be reduced. Use flushLockTimeout(Long) instead.
 void setShutdownTimeout(Long shutdownTimeout)
          Deprecated. The visibility of this method will be reduced. Use shutdownTimeout(Long) instead.
 void setThreadPoolSize(Integer threadPoolSize)
          Deprecated. The visibility of this method will be reduced. Use threadPoolSize(Integer) instead.
 AsyncStoreConfig shutdownTimeout(Long shutdownTimeout)
          Timeout to stop the cache store.
 AsyncStoreConfig threadPoolSize(Integer threadPoolSize)
          Size of the thread pool whose threads are responsible for applying the modifications.
 
Methods inherited from class org.infinispan.loaders.decorators.AbstractDecoratorConfigurationBean
asyncStore, build, fetchPersistentState, getAsyncStoreConfig, getCacheLoaderClassName, getClassLoader, getPurgerThreads, getSingletonStoreConfig, ignoreModifications, isFetchPersistentState, isIgnoreModifications, isPurgeOnStartup, isPurgeSynchronously, purgeOnStartup, purgerThreads, purgeSynchronously, setAsyncStoreConfig, setCacheLoaderClassName, setCacheStoreConfig, setFetchPersistentState, setIgnoreModifications, setPurgeOnStartup, setPurgeSynchronously, setSingletonStoreConfig, singletonStore
 
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
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

enabled

protected Boolean enabled

threadPoolSize

protected Integer threadPoolSize

flushLockTimeout

@Dynamic
protected Long flushLockTimeout

shutdownTimeout

@Dynamic
protected Long shutdownTimeout
Constructor Detail

AsyncStoreConfig

public AsyncStoreConfig()
Method Detail

isEnabled

public Boolean isEnabled()

setEnabled

@Deprecated
public void setEnabled(Boolean enabled)
Deprecated. The visibility of this method will be reduced in favour of more fluent writer method calls.

If true, all modifications to this cache store happen asynchronously, on a separate thread.

Parameters:
enabled -

getThreadPoolSize

public Integer getThreadPoolSize()

setThreadPoolSize

@Deprecated
public void setThreadPoolSize(Integer threadPoolSize)
Deprecated. The visibility of this method will be reduced. Use threadPoolSize(Integer) instead.

Size of the thread pool whose threads are responsible for applying the modifications.

Parameters:
threadPoolSize -

threadPoolSize

public AsyncStoreConfig threadPoolSize(Integer threadPoolSize)
Size of the thread pool whose threads are responsible for applying the modifications.

Parameters:
threadPoolSize -

getFlushLockTimeout

public Long getFlushLockTimeout()

setFlushLockTimeout

@Deprecated
public AsyncStoreConfig setFlushLockTimeout(Long stateLockTimeout)
Deprecated. The visibility of this method will be reduced. Use flushLockTimeout(Long) instead.

Timeout to acquire the lock which guards the state to be flushed to the cache store periodically.

Parameters:
stateLockTimeout -

flushLockTimeout

public AsyncStoreConfig flushLockTimeout(Long stateLockTimeout)
Timeout to acquire the lock which guards the state to be flushed to the cache store periodically.

Parameters:
stateLockTimeout -

getShutdownTimeout

public Long getShutdownTimeout()

setShutdownTimeout

@Deprecated
public void setShutdownTimeout(Long shutdownTimeout)
Deprecated. The visibility of this method will be reduced. Use shutdownTimeout(Long) instead.

Timeout to stop the cache store. When the store is stopped it's possible that some modifications still need to be applied; you likely want to set a very large timeout to make sure to not loose data

Parameters:
shutdownTimeout -

shutdownTimeout

public AsyncStoreConfig shutdownTimeout(Long shutdownTimeout)
Timeout to stop the cache store. When the store is stopped it's possible that some modifications still need to be applied; you likely want to set a very large timeout to make sure to not loose data

Parameters:
shutdownTimeout -

clone

public AsyncStoreConfig clone()
Specified by:
clone in interface CloneableConfigurationComponent
Specified by:
clone in interface CacheLoaderConfig
Overrides:
clone in class AbstractDecoratorConfigurationBean

accept

public void accept(ConfigurationBeanVisitor v)

-->

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