Class DelegatingCacheWriter
- java.lang.Object
-
- org.infinispan.persistence.support.DelegatingCacheWriter
-
- All Implemented Interfaces:
Lifecycle
,CacheWriter
- Direct Known Subclasses:
AsyncCacheWriter
,SingletonCacheWriter
public abstract class DelegatingCacheWriter extends Object implements CacheWriter
- Since:
- 6.0
- Author:
- Mircea Markus
-
-
Field Summary
Fields Modifier and Type Field Description protected CacheWriter
actual
protected InitializationContext
ctx
-
Constructor Summary
Constructors Constructor Description DelegatingCacheWriter(CacheWriter actual)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
delete(Object key)
void
init(InitializationContext ctx)
Used to initialize a cache loader.void
start()
Invoked on component startvoid
stop()
Invoked on component stopCacheWriter
undelegate()
void
write(MarshalledEntry entry)
Persists the entry to the storage.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.persistence.spi.CacheWriter
deleteBatch, isAvailable, writeBatch
-
-
-
-
Field Detail
-
actual
protected final CacheWriter actual
-
ctx
protected InitializationContext ctx
-
-
Constructor Detail
-
DelegatingCacheWriter
public DelegatingCacheWriter(CacheWriter actual)
-
-
Method Detail
-
init
public void init(InitializationContext ctx)
Description copied from interface:CacheWriter
Used to initialize a cache loader. Typically invoked by thePersistenceManager
when setting up cache loaders.- Specified by:
init
in interfaceCacheWriter
-
start
public void start()
Description copied from interface:Lifecycle
Invoked on component start
-
stop
public void stop()
Description copied from interface:Lifecycle
Invoked on component stop
-
write
public void write(MarshalledEntry entry)
Description copied from interface:CacheWriter
Persists the entry to the storage.- Specified by:
write
in interfaceCacheWriter
- See Also:
MarshalledEntry
-
delete
public boolean delete(Object key)
- Specified by:
delete
in interfaceCacheWriter
- Returns:
- true if the entry existed in the persistent store and it was deleted.
-
undelegate
public CacheWriter undelegate()
-
-