@Test public void testElementPlacement() { assertEquals(cache.getHigherBlock(BLOCK_SIZE).getKey().intValue(), (BLOCK_SIZE * 11 / 10)); assertEquals(cache.getHigherBlock((BLOCK_SIZE * 2)).getKey() .intValue(), (BLOCK_SIZE * 21 / 10)); }
Entry<Integer, SingleSizeCache> getHigherBlock(int size) { return slabs.higherEntry(size - 1); }
SlabCache implements SlabItemActionWatcher, BlockCache, HeapSize { Entry<Integer, SingleSizeCache> getHigherBlock(int size) { return slabs.higherEntry(size - 1); } }
SlabCache implements SlabItemActionWatcher, BlockCache, HeapSize { Entry<Integer, SingleSizeCache> getHigherBlock(int size) { return slabs.higherEntry(size - 1); } SlabCache(long size, long avgBlockSize); }
SlabCache implements SlabItemActionWatcher, BlockCache, HeapSize { Entry<Integer, SingleSizeCache> getHigherBlock(int size) { return slabs.higherEntry(size - 1); } SlabCache(long size, long avgBlockSize); Map<Integer, SingleSizeCache> getSizer(); void addSlabByConf(Configuration conf); void cacheBlock(BlockCacheKey cacheKey, Cacheable cachedItem); void cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory); CacheStats getStats(); Cacheable getBlock(BlockCacheKey key, boolean caching, boolean repeat,
      boolean updateCacheMetrics); boolean evictBlock(BlockCacheKey cacheKey); @Override void onEviction(BlockCacheKey key, SingleSizeCache notifier); @Override void onInsertion(BlockCacheKey key, SingleSizeCache notifier); void shutdown(); long heapSize(); long size(); long getFreeSize(); @Override long getBlockCount(); long getCurrentSize(); long getEvictedCount(); int evictBlocksByHfileName(String hfileName); @Override Iterator<CachedBlock> iterator(); @Override BlockCache[] getBlockCaches(); }
SlabCache implements SlabItemActionWatcher, BlockCache, HeapSize { Entry<Integer, SingleSizeCache> getHigherBlock(int size) { return slabs.higherEntry(size - 1); } SlabCache(long size, long avgBlockSize); Map<Integer, SingleSizeCache> getSizer(); void addSlabByConf(Configuration conf); void cacheBlock(BlockCacheKey cacheKey, Cacheable cachedItem); void cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory); CacheStats getStats(); Cacheable getBlock(BlockCacheKey key, boolean caching, boolean repeat,
      boolean updateCacheMetrics); boolean evictBlock(BlockCacheKey cacheKey); @Override void onEviction(BlockCacheKey key, SingleSizeCache notifier); @Override void onInsertion(BlockCacheKey key, SingleSizeCache notifier); void shutdown(); long heapSize(); long size(); long getFreeSize(); @Override long getBlockCount(); long getCurrentSize(); long getEvictedCount(); int evictBlocksByHfileName(String hfileName); @Override Iterator<CachedBlock> iterator(); @Override BlockCache[] getBlockCaches();  }