Package org.cache2k.core.timing
Interface TimerEventListener<K,V>
-
- All Known Subinterfaces:
InternalCache<K,V>
- All Known Implementing Classes:
BaseCache,HeapCache,IntHeapCache,WiredCache
public interface TimerEventListener<K,V>Notifications from theTimingto theInternalCacheupon timer events. This interface is part ofInternalCacheat the moment, but maybe better separated in the future.- Author:
- Jens Wilke
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetName()Designation of target for logging and exceptions.voidtimerEventExpireEntry(Entry<K,V> e, Object task)Called by the timer when an entry is expired or before actual expiry when the entry needs to switch into sharp expiry mode.voidtimerEventProbationTerminated(Entry<K,V> e, Object task)voidtimerEventRefresh(Entry<K,V> e, Object task)The entry should be refreshed.
-
-
-
Method Detail
-
getName
String getName()
Designation of target for logging and exceptions.
-
timerEventExpireEntry
void timerEventExpireEntry(Entry<K,V> e, Object task)
Called by the timer when an entry is expired or before actual expiry when the entry needs to switch into sharp expiry mode. The actual action to be performed is detected by checking theEntry.getNextRefreshTime()- Parameters:
task- timer task as returned byEntry.getTask()to check whether the timer task is still valid after we obtained the entry lock
-
timerEventRefresh
void timerEventRefresh(Entry<K,V> e, Object task)
The entry should be refreshed.- Parameters:
e- seetimerEventExpireEntry(Entry, Object)task- seetimerEventExpireEntry(Entry, Object)
-
timerEventProbationTerminated
void timerEventProbationTerminated(Entry<K,V> e, Object task)
- Parameters:
e- seetimerEventExpireEntry(Entry, Object)task- seetimerEventExpireEntry(Entry, Object)
-
-