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.AsyncStoreConfig
All Implemented Interfaces:
Serializable, Cloneable, CloneableConfigurationComponent, JAXBUnmarshallable

public class AsyncStoreConfig
extends AbstractNamedCacheConfigurationBean

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
EMPTY_PROPERTIES, log, overriddenConfigurationElements
 
Constructor Summary
AsyncStoreConfig()
           
 
Method Summary
 void accept(ConfigurationBeanVisitor v)
           
 AsyncStoreConfig clone()
           
 Long getFlushLockTimeout()
           
 Long getShutdownTimeout()
           
 Integer getThreadPoolSize()
           
 Boolean isEnabled()
           
 void setEnabled(Boolean enabled)
          If true, all modifications to this cache store happen asynchronously, on a separate thread.
 void setFlushLockTimeout(Long stateLockTimeout)
          Timeout to acquire the lock which guards the state to be flushed to the cache store periodically.
 void setShutdownTimeout(Long shutdownTimeout)
          Timeout to stop the cache store.
 void setThreadPoolSize(Integer threadPoolSize)
          Size of the thread pool whose threads are responsible for applying the modifications.
 
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

public void setEnabled(Boolean enabled)
If true, all modifications to this cache store happen asynchronously, on a separate thread.

Parameters:
enabled -

getThreadPoolSize

public Integer getThreadPoolSize()

setThreadPoolSize

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

Parameters:
threadPoolSize -

getFlushLockTimeout

public Long getFlushLockTimeout()

setFlushLockTimeout

public void setFlushLockTimeout(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

public void setShutdownTimeout(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
Overrides:
clone in class AbstractNamedCacheConfigurationBean

accept

public void accept(ConfigurationBeanVisitor v)

Google Analytics

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