public interface

CacheEventListener

com.facebook.cache.common.CacheEventListener

Class Overview

An interface for logging various cache events.

Summary

Nested Classes
enum CacheEventListener.EvictionReason  
Public Methods
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.

Public Methods

public abstract void onEviction (CacheEvent cacheEvent)

Triggered by an eviction from cache.

public abstract void onHit (CacheEvent cacheEvent)

Triggered by a cache hit.

public abstract void onMiss (CacheEvent cacheEvent)

Triggered by a cache miss for the given key.

public abstract void onReadException (CacheEvent cacheEvent)

Triggered if a cache hit was attempted but an exception was thrown trying to read the resource from storage.

public abstract void onWriteAttempt (CacheEvent cacheEvent)

Triggered at the start of the process to save a resource in cache.

public abstract void onWriteException (CacheEvent cacheEvent)

Triggered if a cache write was attempted but an exception was thrown trying to write the exception to storage.

public abstract void onWriteSuccess (CacheEvent cacheEvent)

Triggered after a resource has been successfully written to cache.