public interface CacheUsageListener
Implementations of this interface should implement the Object.equals(Object)
and the Object.hashCode()
as registering and
removing listeners depends on these
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Called to dispose off the listener
|
void |
notifyCacheElementEvicted()
Called when an element is expired in the cache
|
void |
notifyCacheElementExpired()
Called when an element in the cache expires
|
void |
notifyCacheElementPut()
Called when an element is inserted in the cache
|
void |
notifyCacheElementRemoved()
Called when an element is removed from the cache
|
void |
notifyCacheElementUpdated()
Called when an element is updated in the cache, i.e.
|
void |
notifyCacheHitInMemory()
Called on a cache hit in the MemoryStore
|
void |
notifyCacheHitOffHeap()
Called on a cache hit in the off-heap store
|
void |
notifyCacheHitOnDisk()
Called on a cache hit in the DiskStore
|
void |
notifyCacheMissedWithExpired()
Called when an element is found in the cache but already expired
|
void |
notifyCacheMissedWithNotFound()
Called when an element is not found in the cache
|
void |
notifyCacheMissInMemory()
Called on a cache miss in the MemoryStore
|
void |
notifyCacheMissOffHeap()
Called on a cache miss in the off-heap store
|
void |
notifyCacheMissOnDisk()
Called on a cache miss in the DiskStore
|
void |
notifyCacheSearch(long executeTime)
Called when a search finishes execution
|
void |
notifyGetTimeNanos(long nanos)
Notified with time taken for a get operation in the cache
|
void |
notifyRemoveAll()
Called when Cache.removeAll() is called
|
void |
notifyStatisticsAccuracyChanged(int statisticsAccuracy)
Notified when the statistics accuracy is changed.
|
void |
notifyTimeTakenForGet(long millis)
Deprecated.
|
void |
notifyXaCommit()
Called when the Cache's XAResource has been asked to commit
|
void |
notifyXaRollback()
Called when the Cache's XAResource has been asked to rollback
|
void notifyCacheHitInMemory()
void notifyCacheHitOffHeap()
void notifyCacheHitOnDisk()
void notifyCacheElementPut()
void notifyCacheElementUpdated()
void notifyCacheMissedWithNotFound()
void notifyCacheMissInMemory()
void notifyCacheMissOffHeap()
void notifyCacheMissOnDisk()
void notifyCacheMissedWithExpired()
@Deprecated void notifyTimeTakenForGet(long millis)
millis
- void notifyGetTimeNanos(long nanos)
nanos
- void notifyCacheElementEvicted()
void notifyCacheElementExpired()
void notifyCacheElementRemoved()
void notifyRemoveAll()
void notifyStatisticsAccuracyChanged(int statisticsAccuracy)
statisticsAccuracy
- the statistics accuracyvoid dispose()
void notifyCacheSearch(long executeTime)
executeTime
- elapsed time in millisvoid notifyXaCommit()
void notifyXaRollback()
Copyright 2001-2021, Terracotta, Inc.