public interface CacheEvictor extends Cache.Listener
Cache
. Implementations should call Cache.removeSpan(CacheSpan)
to evict cache entries based on their eviction policies.Modifier and Type | Method and Description |
---|---|
void |
onCacheInitialized()
Invoked when cache has beeen initialized.
|
void |
onStartFile(Cache cache,
String key,
long position,
long length)
Invoked when a writer starts writing to the cache.
|
onSpanAdded, onSpanRemoved, onSpanTouched
void onCacheInitialized()
void onStartFile(Cache cache, String key, long position, long length)
cache
- The source of the event.key
- The key being written.position
- The starting position of the data being written.length
- The maximum length of the data being written.