com.facebook.cache.common.CacheEventListener |
Known Indirect Subclasses |
An interface for logging various cache events.
In all callback methods, the CacheEvent
object should not be held beyond the method
itself as they may be automatically recycled.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
enum | CacheEventListener.EvictionReason |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
onCleared()
Triggered by a full cache clearance.
| ||||||||||
abstract void |
onEviction(CacheEvent cacheEvent)
Triggered by an eviction from cache.
| ||||||||||
abstract void |
onHit(CacheEvent cacheEvent)
Triggered by a cache hit.
| ||||||||||
abstract void |
onMiss(CacheEvent cacheEvent)
Triggered by a cache miss for the given key.
| ||||||||||
abstract void |
onReadException(CacheEvent cacheEvent)
Triggered if a cache hit was attempted but an exception was thrown trying to read the resource
from storage.
| ||||||||||
abstract void |
onWriteAttempt(CacheEvent cacheEvent)
Triggered at the start of the process to save a resource in cache.
| ||||||||||
abstract void |
onWriteException(CacheEvent cacheEvent)
Triggered if a cache write was attempted but an exception was thrown trying to write the
exception to storage.
| ||||||||||
abstract void |
onWriteSuccess(CacheEvent cacheEvent)
Triggered after a resource has been successfully written to cache.
|
Triggered by a full cache clearance.
Triggered if a cache hit was attempted but an exception was thrown trying to read the resource from storage.
Triggered at the start of the process to save a resource in cache.
Triggered if a cache write was attempted but an exception was thrown trying to write the exception to storage.
Triggered after a resource has been successfully written to cache.