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)
Persists the entry to the storage.
|
undelegate
protected org.infinispan.persistence.async.BufferLock stateLock
protected final AtomicReference<State> state
protected AsyncStoreConfiguration asyncConfiguration
public AsyncCacheWriter(CacheWriter delegate)
public void init(InitializationContext ctx)
CacheWriter
PersistenceManager
when setting up cache loaders.init
in interface CacheWriter
init
in class DelegatingCacheWriter
public void start()
start
in interface Lifecycle
start
in class DelegatingCacheWriter
public void stop()
stop
in interface Lifecycle
stop
in class DelegatingCacheWriter
public void write(MarshalledEntry entry)
CacheWriter
write
in interface CacheWriter
write
in class DelegatingCacheWriter
MarshalledEntry
public boolean delete(Object key)
delete
in interface CacheWriter
delete
in class DelegatingCacheWriter
protected void applyModificationsSync(List<Modification> mods) throws PersistenceException
PersistenceException
public AtomicReference<State> getState()
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.