|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infinispan.loader.decorators.AbstractDelegatingStore
org.infinispan.loader.decorators.AsyncStore
public class AsyncStore
The AsyncStore is a delegating CacheStore that extends AbstractDelegatingStore, overriding methods to that should not just delegate the operation to the underlying store.
Read operations are done synchronously, while write operations are done asynchronously. There is no provision for exception handling for problems encountered with the underlying store during a write operation, and the exception is just logged. When configuring the loader, use the following element: <async enabled="true" />
to define whether cache loader operations are to be asynchronous. If not specified, a cache loader operation is
assumed synchronous and this decorator is not applied.
Constructor Summary | |
---|---|
AsyncStore(CacheStore cacheStore,
AsyncStoreConfig asyncStoreConfig)
|
Method Summary | |
---|---|
protected void |
applyModificationsSync(List<Modification> mods)
|
void |
clear()
Clears all entries in the store |
void |
purgeExpired()
Purges expired entries from the store. |
boolean |
remove(Object key)
Removes an entry in the store. |
void |
start()
|
void |
stop()
|
void |
store(InternalCacheEntry ed)
Stores an entry |
Methods inherited from class org.infinispan.loader.decorators.AbstractDelegatingStore |
---|
commit, containsKey, fromStream, getConfigurationClass, getDelegate, init, load, loadAll, prepare, removeAll, rollback, setDelegate, toStream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AsyncStore(CacheStore cacheStore, AsyncStoreConfig asyncStoreConfig)
Method Detail |
---|
public void store(InternalCacheEntry ed)
CacheStore
store
in interface CacheStore
store
in class AbstractDelegatingStore
ed
- entry to storepublic void clear()
CacheStore
clear
in interface CacheStore
clear
in class AbstractDelegatingStore
public boolean remove(Object key)
CacheStore
remove
in interface CacheStore
remove
in class AbstractDelegatingStore
key
- key to remove
public void purgeExpired()
CacheStore
purgeExpired
in interface CacheStore
purgeExpired
in class AbstractDelegatingStore
public void start() throws CacheLoaderException
start
in interface CacheLoader
start
in class AbstractDelegatingStore
CacheLoaderException
public void stop() throws CacheLoaderException
stop
in interface CacheLoader
stop
in class AbstractDelegatingStore
CacheLoaderException
protected void applyModificationsSync(List<Modification> mods) throws CacheLoaderException
CacheLoaderException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |