CacheDataSource.EventListener


public interface CacheDataSource.EventListener


Listener of CacheDataSource events.

Summary

Public methods

abstract void

Called when the current request ignores cache.

abstract void
onCachedBytesRead(long cacheSizeBytes, long cachedBytesRead)

Called when bytes have been read from the cache.

Public methods

onCacheIgnored

abstract void onCacheIgnored(@CacheDataSource.CacheIgnoredReason int reason)

Called when the current request ignores cache.

Parameters
@CacheDataSource.CacheIgnoredReason int reason

Reason cache is bypassed.

onCachedBytesRead

abstract void onCachedBytesRead(long cacheSizeBytes, long cachedBytesRead)

Called when bytes have been read from the cache.

Parameters
long cacheSizeBytes

Current cache size in bytes.

long cachedBytesRead

Total bytes read from the cache since this method was last called.