org.infinispan.configuration.cache
Class AsyncLoaderConfiguration

java.lang.Object
  extended by org.infinispan.configuration.cache.AsyncLoaderConfiguration

public class AsyncLoaderConfiguration
extends Object

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

Author:
pmuir

Method Summary
 boolean enabled()
          If true, all modifications to this cache store happen asynchronously, on a separate thread.
 long flushLockTimeout()
          Timeout to acquire the lock which guards the state to be flushed to the cache store periodically.
 AsyncLoaderConfiguration flushLockTimeout(long l)
          Timeout to acquire the lock which guards the state to be flushed to the cache store periodically.
 int modificationQueueSize()
          Sets the size of the modification queue for the async store.
 long shutdownTimeout()
          Timeout to stop the cache store.
 AsyncLoaderConfiguration shutdownTimeout(long l)
           
 int threadPoolSize()
          Size of the thread pool whose threads are responsible for applying the modifications.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

enabled

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


flushLockTimeout

public long flushLockTimeout()
Timeout to acquire the lock which guards the state to be flushed to the cache store periodically. The timeout can be adjusted for a running cache.

Returns:

flushLockTimeout

public AsyncLoaderConfiguration flushLockTimeout(long l)
Timeout to acquire the lock which guards the state to be flushed to the cache store periodically. The timeout can be adjusted for a running cache.


modificationQueueSize

public int modificationQueueSize()
Sets the size of the modification queue for the async store. If updates are made at a rate that is faster than the underlying cache store can process this queue, then the async store behaves like a synchronous store for that period, blocking until the queue can accept more elements.


shutdownTimeout

public 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


shutdownTimeout

public AsyncLoaderConfiguration shutdownTimeout(long l)

threadPoolSize

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


toString

public String toString()
Overrides:
toString in class Object

-->

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