public class AsyncCacheWriter extends DelegatingCacheWriter
<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.
Write operations affecting same key are now coalesced so that only the final state is actually stored.
| Modifier and Type | Field and Description |
|---|---|
protected AsyncStoreConfiguration |
asyncConfiguration |
protected AtomicReference<State> |
state |
protected org.infinispan.persistence.async.BufferLock |
stateLock |
actual, ctx| Constructor and Description |
|---|
AsyncCacheWriter(CacheWriter delegate) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyModificationsSync(List<Modification> mods) |
boolean |
delete(Object key) |
AtomicReference<State> |
getState() |
void |
init(InitializationContext ctx)
Used to initialize a cache loader.
|
void |
start() |
void |
stop() |
void |
write(MarshalledEntry entry) |
undelegateprotected org.infinispan.persistence.async.BufferLock stateLock
protected final AtomicReference<State> state
protected AsyncStoreConfiguration asyncConfiguration
public AsyncCacheWriter(CacheWriter delegate)
public void init(InitializationContext ctx)
CacheWriterPersistenceManager
when setting up cache loaders.init in interface CacheWriterinit in class DelegatingCacheWriterpublic void start()
start in interface Lifecyclestart in class DelegatingCacheWriterpublic void stop()
stop in interface Lifecyclestop in class DelegatingCacheWriterpublic void write(MarshalledEntry entry)
write in interface CacheWriterwrite in class DelegatingCacheWriterpublic boolean delete(Object key)
delete in interface CacheWriterdelete in class DelegatingCacheWriterprotected void applyModificationsSync(List<Modification> mods) throws CacheLoaderException
CacheLoaderExceptionpublic AtomicReference<State> getState()
Copyright © 2013 JBoss, a division of Red Hat. All rights reserved.