Package org.infinispan.persistence.spi
Interface AdvancedCacheExpirationWriter<K,V>
- All Superinterfaces:
AdvancedCacheWriter<K,
,V> CacheWriter<K,
,V> Lifecycle
- All Known Subinterfaces:
SegmentedAdvancedLoadWriteStore<K,
V>
- All Known Implementing Classes:
AbstractSegmentedAdvancedLoadWriteStore
,ComposedSegmentedLoadWriteStore
@Experimental
@Deprecated(forRemoval=true,
since="11.0")
public interface AdvancedCacheExpirationWriter<K,V>
extends AdvancedCacheWriter<K,V>
Deprecated, for removal: This API element is subject to removal in a future version.
Defines functionality for advanced expiration techniques. Note this interface allows for providing not just the key
when an entry is expired. This is important so that proper cluster wide expiration can be performed.
- Since:
- 8.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Deprecated, for removal: This API element is subject to removal in a future version.Callback to be notified when an entry is removed by thepurge(Executor, ExpirationPurgeListener)
method.Nested classes/interfaces inherited from interface org.infinispan.persistence.spi.AdvancedCacheWriter
AdvancedCacheWriter.PurgeListener<K>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
purge
(Executor executor, AdvancedCacheExpirationWriter.ExpirationPurgeListener<K, V> listener) Deprecated, for removal: This API element is subject to removal in a future version.Using the thread in the pool, removed all the expired data from the persistence storage.default void
purge
(Executor threadPool, AdvancedCacheWriter.PurgeListener<? super K> listener) Deprecated, for removal: This API element is subject to removal in a future version.This method is never called.Methods inherited from interface org.infinispan.persistence.spi.AdvancedCacheWriter
clear
Methods inherited from interface org.infinispan.persistence.spi.CacheWriter
bulkUpdate, delete, deleteBatch, init, isAvailable, write
-
Method Details
-
purge
Deprecated, for removal: This API element is subject to removal in a future version.Using the thread in the pool, removed all the expired data from the persistence storage. For each removed entry, the supplied listener is invoked. This should be preferred toAdvancedCacheWriter.purge(Executor, PurgeListener)
since it allows for value and metadata to be provided which provides more accurate expiration when coordination is required.- Parameters:
executor
- the executor to invoke the given command onlistener
- the listener that is notified for each expired entry- Throws:
PersistenceException
- in case of an error, e.g. communicating with the external storage
-
purge
Deprecated, for removal: This API element is subject to removal in a future version.This method is never called. Implementers ofAdvancedCacheExpirationWriter
must instead implementpurge(Executor, ExpirationPurgeListener)
.- Specified by:
purge
in interfaceAdvancedCacheWriter<K,
V>
-
NonBlockingStore