Package org.apache.hadoop.hbase.io.hfile
Interface FirstLevelBlockCache
- All Superinterfaces:
BlockCache
,HeapSize
,Iterable<CachedBlock>
,ResizableBlockCache
- All Known Implementing Classes:
IndexOnlyLruBlockCache
,LruAdaptiveBlockCache
,LruBlockCache
,TinyLfuBlockCache
In-memory BlockCache that may be backed by secondary layer(s).
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsBlock
(BlockCacheKey cacheKey) Whether the cache contains the block with specified cacheKeyvoid
setVictimCache
(BlockCache victimCache) Specifies the secondary cache.Methods inherited from interface org.apache.hadoop.hbase.io.hfile.BlockCache
blockFitsIntoTheCache, cacheBlock, cacheBlock, cacheBlock, evictBlock, evictBlocksByHfileName, getBlock, getBlockCaches, getBlockCount, getBlockSize, getCurrentDataSize, getCurrentSize, getDataBlockCount, getFreeSize, getFullyCachedFiles, getMaxSize, getStats, isAlreadyCached, isMetaBlock, iterator, notifyFileBlockEvicted, notifyFileCachingCompleted, shouldCacheFile, shutdown, size
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.apache.hadoop.hbase.io.hfile.ResizableBlockCache
setMaxSize
-
Method Details
-
containsBlock
Whether the cache contains the block with specified cacheKey- Parameters:
cacheKey
- cache key for the block- Returns:
- true if it contains the block
-
setVictimCache
Specifies the secondary cache. An entry that is evicted from this cache due to a size constraint will be inserted into the victim cache.- Parameters:
victimCache
- the second level cache- Throws:
IllegalArgumentException
- if the victim cache had already been set
-