Beispiel #1
0
 @After
 public void tearDown() {
   cache.shutdown();
 }
Beispiel #2
0
 @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));
 }
Beispiel #3
0
 @Before
 public void setup() {
   cache = new SlabCache(CACHE_SIZE + BLOCK_SIZE * 2, BLOCK_SIZE);
   cache.addSlabByConf(new Configuration());
 }