-
- All Implemented Interfaces:
-
com.facebook.cache.common.CacheEventListener
public class BaseCacheEventListener implements CacheEventListener
No-op implementation of CacheEventListener so that listeners can extend and implement only the events they're interested in.
-
-
Method Summary
Modifier and Type Method Description voidonHit(CacheEvent cacheEvent)Triggered by a cache hit. voidonMiss(CacheEvent cacheEvent)Triggered by a cache miss for the given key. voidonWriteAttempt(CacheEvent cacheEvent)Triggered at the start of the process to save a resource in cache. voidonWriteSuccess(CacheEvent cacheEvent)Triggered after a resource has been successfully written to cache. voidonReadException(CacheEvent cacheEvent)Triggered if a cache hit was attempted but an exception was thrown trying to read the resourcefrom storage. voidonWriteException(CacheEvent cacheEvent)Triggered if a cache write was attempted but an exception was thrown trying to write theexception to storage. voidonEviction(CacheEvent cacheEvent)Triggered by an eviction from cache. voidonCleared()Triggered by a full cache clearance. -
-
Method Detail
-
onHit
void onHit(CacheEvent cacheEvent)
Triggered by a cache hit.
-
onMiss
void onMiss(CacheEvent cacheEvent)
Triggered by a cache miss for the given key.
-
onWriteAttempt
void onWriteAttempt(CacheEvent cacheEvent)
Triggered at the start of the process to save a resource in cache.
-
onWriteSuccess
void onWriteSuccess(CacheEvent cacheEvent)
Triggered after a resource has been successfully written to cache.
-
onReadException
void onReadException(CacheEvent cacheEvent)
Triggered if a cache hit was attempted but an exception was thrown trying to read the resourcefrom storage.
-
onWriteException
void onWriteException(CacheEvent cacheEvent)
Triggered if a cache write was attempted but an exception was thrown trying to write theexception to storage.
-
onEviction
void onEviction(CacheEvent cacheEvent)
Triggered by an eviction from cache.
-
onCleared
void onCleared()
Triggered by a full cache clearance.
-
-
-
-