Interface DfsBlockCacheConfig.IndexEventConsumer
-
- Enclosing class:
- DfsBlockCacheConfig
public static interface DfsBlockCacheConfig.IndexEventConsumer
Consumer of DfsBlockCache loading and eviction events for indexes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
acceptEvictedEvent(int packExtPos, long bytes, int totalCacheHitCount, Duration lastEvictionDuration)
Accept an event of an index evicted from cache.void
acceptRequestedEvent(int packExtPos, boolean cacheHit, long loadMicros, long bytes, Duration lastEvictionDuration)
Accept an event of an index requested.default boolean
shouldReportEvictedEvent()
-
-
-
Method Detail
-
acceptRequestedEvent
void acceptRequestedEvent(int packExtPos, boolean cacheHit, long loadMicros, long bytes, Duration lastEvictionDuration)
Accept an event of an index requested. It could be loaded from either cache or storage.- Parameters:
packExtPos
- position inPackExt
enumcacheHit
- true if an index was already in cache. Otherwise, the index was loaded from storage into the cache in the current request,loadMicros
- time to load an index from cache or storage in microsecondsbytes
- number of bytes loadedlastEvictionDuration
- time since last eviction, 0 if was not evicted yet
-
acceptEvictedEvent
default void acceptEvictedEvent(int packExtPos, long bytes, int totalCacheHitCount, Duration lastEvictionDuration)
Accept an event of an index evicted from cache.- Parameters:
packExtPos
- position inPackExt
enumbytes
- number of bytes evictedtotalCacheHitCount
- number of times an index was accessed while in cachelastEvictionDuration
- time since last eviction, 0 if was not evicted yet
-
shouldReportEvictedEvent
default boolean shouldReportEvictedEvent()
- Returns:
- true if reporting evicted events is enabled.
-
-