Interface FirstLevelBlockCache

All Superinterfaces:
BlockCache, HeapSize, Iterable<CachedBlock>, ResizableBlockCache
All Known Implementing Classes:
IndexOnlyLruBlockCache, LruAdaptiveBlockCache, LruBlockCache, TinyLfuBlockCache

@Private public interface FirstLevelBlockCache extends ResizableBlockCache, HeapSize
In-memory BlockCache that may be backed by secondary layer(s).
  • Method Details

    • containsBlock

      boolean containsBlock(BlockCacheKey cacheKey)
      Whether the cache contains the block with specified cacheKey
      Parameters:
      cacheKey - cache key for the block
      Returns:
      true if it contains the block
    • setVictimCache

      void setVictimCache(BlockCache victimCache)
      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