@ThreadSafe public interface AdvancedCacheWriter<K,V> extends CacheWriter<K,V>
Modifier and Type | Interface and Description |
---|---|
static interface |
AdvancedCacheWriter.PurgeListener<K>
Callback to be notified when an entry is removed by the
purge(java.util.concurrent.Executor,
org.infinispan.persistence.spi.AdvancedCacheWriter.PurgeListener) method. |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all the data from the storage.
|
void |
purge(Executor threadPool,
AdvancedCacheWriter.PurgeListener<? super K> listener)
Using the thread in the pool, removed all the expired data from the persistence storage.
|
delete, deleteBatch, init, write, writeBatch
void clear()
PersistenceException
- in case of an error, e.g. communicating with the external storagevoid purge(Executor threadPool, AdvancedCacheWriter.PurgeListener<? super K> listener)
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.
PersistenceException
- in case of an error, e.g. communicating with the external storageCopyright © 2018 JBoss, a division of Red Hat. All rights reserved.