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) |
protected void |
clearStore() |
boolean |
delete(Object key) |
AtomicReference<State> |
getState() |
void |
init(InitializationContext ctx)
Used to initialize a cache loader.
|
protected State |
newState(boolean clear,
State next) |
void |
start()
Invoked on component start
|
void |
stop()
Invoked on component stop
|
void |
write(MarshalledEntry entry)
Persists the entry to the storage.
|
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()
Lifecyclestart in interface Lifecyclestart in class DelegatingCacheWriterpublic void stop()
Lifecyclestop in interface Lifecyclestop in class DelegatingCacheWriterpublic void write(MarshalledEntry entry)
CacheWriterwrite in interface CacheWriterwrite in class DelegatingCacheWriterMarshalledEntrypublic boolean delete(Object key)
delete in interface CacheWriterdelete in class DelegatingCacheWriterprotected void applyModificationsSync(List<Modification> mods) throws PersistenceException
PersistenceExceptionpublic AtomicReference<State> getState()
protected void clearStore()
Copyright © 2025 JBoss, a division of Red Hat. All rights reserved.