@InterfaceAudience.Private public class InclusiveCombinedBlockCache extends CombinedBlockCache
CombinedBlockCache.CombinedCacheStats
combinedCacheStats, l1Cache, l2Cache
Constructor and Description |
---|
InclusiveCombinedBlockCache(FirstLevelBlockCache l1,
BlockCache l2) |
Modifier and Type | Method and Description |
---|---|
void |
cacheBlock(BlockCacheKey cacheKey,
Cacheable buf,
boolean inMemory)
Add block to cache.
|
boolean |
evictBlock(BlockCacheKey cacheKey)
Evict block from cache.
|
Cacheable |
getBlock(BlockCacheKey cacheKey,
boolean caching,
boolean repeat,
boolean updateCacheMetrics)
Fetch block from cache.
|
cacheBlock, evictBlocksByHfileName, getBlockCaches, getBlockCount, getCurrentDataSize, getCurrentSize, getDataBlockCount, getFirstLevelCache, getFreeSize, getMaxSize, getRpcRefCount, getSecondLevelCache, getStats, heapSize, iterator, setMaxSize, shutdown, size
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isMetaBlock
forEach, spliterator
public InclusiveCombinedBlockCache(FirstLevelBlockCache l1, BlockCache l2)
public Cacheable getBlock(BlockCacheKey cacheKey, boolean caching, boolean repeat, boolean updateCacheMetrics)
BlockCache
getBlock
in interface BlockCache
getBlock
in class CombinedBlockCache
cacheKey
- Block to fetch.caching
- Whether this request has caching enabled (used for stats)repeat
- Whether this is a repeat lookup for the same block (used to avoid
double counting cache misses when doing double-check locking)updateCacheMetrics
- Whether to update cache metrics or notpublic void cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory)
BlockCache
cacheBlock
in interface BlockCache
cacheBlock
in class CombinedBlockCache
cacheKey
- The block's cache key.buf
- The block contents wrapped in a ByteBuffer.inMemory
- Whether block should be treated as in-memory. This parameter is only useful for
the L1 lru cache.public boolean evictBlock(BlockCacheKey cacheKey)
BlockCache
evictBlock
in interface BlockCache
evictBlock
in class CombinedBlockCache
cacheKey
- Block to evictCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.