@InterfaceAudience.LimitedPrivate(value="Configuration") public class InclusiveCombinedBlockCache extends CombinedBlockCache implements BlockCache
CombinedBlockCache.CombinedCacheStats
combinedCacheStats, l2Cache, lruCache
Constructor and Description |
---|
InclusiveCombinedBlockCache(LruBlockCache l1,
BlockCache l2) |
Modifier and Type | Method and Description |
---|---|
void |
cacheBlock(BlockCacheKey cacheKey,
Cacheable buf,
boolean inMemory,
boolean cacheDataInL1)
Add block to cache.
|
Cacheable |
getBlock(BlockCacheKey cacheKey,
boolean caching,
boolean repeat,
boolean updateCacheMetrics)
Fetch block from cache.
|
cacheBlock, evictBlock, evictBlocksByHfileName, getBlockCaches, getBlockCount, getCurrentSize, getFreeSize, getStats, heapSize, iterator, setMaxSize, shutdown, size
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cacheBlock, evictBlock, evictBlocksByHfileName, getBlockCaches, getBlockCount, getCurrentSize, getFreeSize, getStats, iterator, shutdown, size
public InclusiveCombinedBlockCache(LruBlockCache 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, boolean cacheDataInL1)
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.cacheDataInL1
- This is totally ignored.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.