K - V - @ThreadSafe public class ClusterExpirationManager<K,V> extends ExpirationManagerImpl<K,V>
Cache stores however do not supply the value or metadata information which means if an entry is purged from the cache store that it will forcibly remove the value even if a concurrent write updated it just before. This will be addressed by future SPI changes to the cache store.
| Modifier and Type | Field and Description |
|---|---|
protected static Log |
log |
protected static boolean |
trace |
cacheName, cacheNotifier, configuration, dataContainer, enabled, executor, expirationTask, expiring, persistenceManager, timeService| Constructor and Description |
|---|
ClusterExpirationManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
handleInMemoryExpiration(InternalCacheEntry<K,V> entry,
long currentTime)
This should be invoked passing in an entry that is now expired.
|
void |
handleInStoreExpiration(K key)
This is to be invoked when a store entry expires.
|
void |
handleInStoreExpiration(MarshalledEntry<K,V> marshalledEntry)
This is to be invoked when a store entry expires and the value and/or metadata is available to be used.
|
void |
inject(AdvancedCache<K,V> cache,
ExecutorService asyncExecutor) |
void |
processExpiration()
Processes the expiration event queue.
|
initialize, isEnabled, registerWriteIncoming, start, stop, unregisterWriteprotected static final Log log
protected static final boolean trace
public void inject(AdvancedCache<K,V> cache, ExecutorService asyncExecutor)
public void processExpiration()
ExpirationManagerprocessExpiration in interface ExpirationManager<K,V>processExpiration in class ExpirationManagerImpl<K,V>public void handleInMemoryExpiration(InternalCacheEntry<K,V> entry, long currentTime)
ExpirationManagerhandleInMemoryExpiration in interface ExpirationManager<K,V>handleInMemoryExpiration in class ExpirationManagerImpl<K,V>entry - entry that is now expiredcurrentTime - the current time in millisecondspublic void handleInStoreExpiration(K key)
ExpirationManager
Note this method doesn't currently take a InternalCacheEntry and this is due to a limitation in the
cache store API. This may cause some values to be removed if they were updated at the same time.
handleInStoreExpiration in interface ExpirationManager<K,V>handleInStoreExpiration in class ExpirationManagerImpl<K,V>key - the key of the expired entrypublic void handleInStoreExpiration(MarshalledEntry<K,V> marshalledEntry)
ExpirationManagerExpirationManager.handleInStoreExpiration(Object) as it allows for more
specific expiration to possibly occur.handleInStoreExpiration in interface ExpirationManager<K,V>handleInStoreExpiration in class ExpirationManagerImpl<K,V>marshalledEntry - the entry that can be unmarshalled as neededCopyright © 2025 JBoss, a division of Red Hat. All rights reserved.