Class InclusiveCombinedBlockCache

java.lang.Object
org.apache.hadoop.hbase.io.hfile.CombinedBlockCache
org.apache.hadoop.hbase.io.hfile.InclusiveCombinedBlockCache
All Implemented Interfaces:
Iterable<CachedBlock>, HeapSize, BlockCache, ResizableBlockCache

@Private public class InclusiveCombinedBlockCache extends CombinedBlockCache
  • Constructor Details

  • Method Details

    • getBlock

      public Cacheable getBlock(BlockCacheKey cacheKey, boolean caching, boolean repeat, boolean updateCacheMetrics)
      Description copied from interface: BlockCache
      Fetch block from cache.
      Specified by:
      getBlock in interface BlockCache
      Overrides:
      getBlock in class CombinedBlockCache
      Parameters:
      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 not
      Returns:
      Block or null if block is not in 2 cache.
    • cacheBlock

      public void cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory)
      Description copied from interface: BlockCache
      Add block to cache.
      Specified by:
      cacheBlock in interface BlockCache
      Overrides:
      cacheBlock in class CombinedBlockCache
      Parameters:
      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.
    • evictBlock

      public boolean evictBlock(BlockCacheKey cacheKey)
      Description copied from interface: BlockCache
      Evict block from cache.
      Specified by:
      evictBlock in interface BlockCache
      Overrides:
      evictBlock in class CombinedBlockCache
      Parameters:
      cacheKey - Block to evict
      Returns:
      true if block existed and was evicted, false if not