Package org.infinispan.persistence.async
Class AdvancedAsyncCacheWriter
- java.lang.Object
-
- org.infinispan.persistence.support.DelegatingCacheWriter
-
- org.infinispan.persistence.async.AsyncCacheWriter
-
- org.infinispan.persistence.async.AdvancedAsyncCacheWriter
-
- All Implemented Interfaces:
Lifecycle
,AdvancedCacheWriter
,CacheWriter
public class AdvancedAsyncCacheWriter extends AsyncCacheWriter implements AdvancedCacheWriter
- Since:
- 6.0
- Author:
- Mircea Markus
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.persistence.spi.AdvancedCacheWriter
AdvancedCacheWriter.PurgeListener<K>
-
-
Field Summary
-
Fields inherited from class org.infinispan.persistence.async.AsyncCacheWriter
asyncConfiguration, state, stateLock
-
Fields inherited from class org.infinispan.persistence.support.DelegatingCacheWriter
actual, ctx
-
-
Constructor Summary
Constructors Constructor Description AdvancedAsyncCacheWriter(CacheWriter delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Removes all the data from the storage.protected void
clearStore()
void
purge(Executor threadPool, AdvancedCacheWriter.PurgeListener task)
Using the thread in the pool, removed all the expired data from the persistence storage.-
Methods inherited from class org.infinispan.persistence.async.AsyncCacheWriter
applyModificationsSync, delete, deleteBatch, getState, init, isAvailable, newState, start, stop, write, writeBatch
-
Methods inherited from class org.infinispan.persistence.support.DelegatingCacheWriter
undelegate
-
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
delete, deleteBatch, init, isAvailable, write, writeBatch
-
-
-
-
Constructor Detail
-
AdvancedAsyncCacheWriter
public AdvancedAsyncCacheWriter(CacheWriter delegate)
-
-
Method Detail
-
purge
public void purge(Executor threadPool, AdvancedCacheWriter.PurgeListener task)
Description copied from interface:AdvancedCacheWriter
Using the thread in the pool, removed all the expired data from the persistence storage. For each removed entry, the supplied listener is invoked.When this method returns all entries will be purged and no tasks will be running due to this loader in the provided executor. If however an exception is thrown there could be tasks still pending or running in the executor.
- Specified by:
purge
in interfaceAdvancedCacheWriter
-
clear
public void clear()
Description copied from interface:AdvancedCacheWriter
Removes all the data from the storage.- Specified by:
clear
in interfaceAdvancedCacheWriter
-
clearStore
protected void clearStore()
- Overrides:
clearStore
in classAsyncCacheWriter
-
-