public class

BaseCacheEventListener

extends Object
implements CacheEventListener
java.lang.Object
   ↳ com.facebook.cache.common.BaseCacheEventListener

Class Overview

No-op implementation of CacheEventListener so that listeners can extend and implement only the events they're interested in.

Summary

Public Constructors
BaseCacheEventListener()
Public Methods
void onCleared()
Triggered by a full cache clearance.
void onEviction(CacheEvent cacheEvent)
Triggered by an eviction from cache.
void onHit(CacheEvent cacheEvent)
Triggered by a cache hit.
void onMiss(CacheEvent cacheEvent)
Triggered by a cache miss for the given key.
void onReadException(CacheEvent cacheEvent)
Triggered if a cache hit was attempted but an exception was thrown trying to read the resource from storage.
void onWriteAttempt(CacheEvent cacheEvent)
Triggered at the start of the process to save a resource in cache.
void onWriteException(CacheEvent cacheEvent)
Triggered if a cache write was attempted but an exception was thrown trying to write the exception to storage.
void onWriteSuccess(CacheEvent cacheEvent)
Triggered after a resource has been successfully written to cache.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.facebook.cache.common.CacheEventListener

Public Constructors

public BaseCacheEventListener ()

Public Methods

public void onCleared ()

Triggered by a full cache clearance.

public void onEviction (CacheEvent cacheEvent)

Triggered by an eviction from cache.

public void onHit (CacheEvent cacheEvent)

Triggered by a cache hit.

public void onMiss (CacheEvent cacheEvent)

Triggered by a cache miss for the given key.

public void onReadException (CacheEvent cacheEvent)

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

public void onWriteAttempt (CacheEvent cacheEvent)

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

public void onWriteException (CacheEvent cacheEvent)

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

public void onWriteSuccess (CacheEvent cacheEvent)

Triggered after a resource has been successfully written to cache.