private void evictAll(IgniteCache<Integer,CacheValue> cache) throws Exception {
  resetCounters();
  assertEquals(ENTRY_CNT,cache.size());
  assertEquals(0,cache.localSize(CachePeekMode.OFFHEAP));
  for (int i=0; i < ENTRY_CNT; i++) {
    cache.localEvict(Collections.singleton(i));
    assertEquals(ENTRY_CNT - i - 1,cache.localSize(CachePeekMode.ONHEAP));
    assertEquals(i + 1,cache.localSize(CachePeekMode.OFFHEAP));
  }
  assertEquals(0,cache.localSize(CachePeekMode.ONHEAP));
  assertEquals(ENTRY_CNT,cache.localSize(CachePeekMode.OFFHEAP));
  for (int i=0; i < ENTRY_CNT; i++)   assertNull(cache.localPeek(i,CachePeekMode.ONHEAP));
  assertEquals(ENTRY_CNT,swapCnt.get());
  assertEquals(0,unswapCnt.get());
}

private void evictAll ( IgniteCache < Integer , CacheValue > cache ) throws Exception { resetCounters ( ) ; assertEquals ( ENTRY_CNT , cache . size ( ) ) ; assertEquals ( 0 , cache . localSize ( CachePeekMode . OFFHEAP ) ) ; for ( int i = 0 ; i < ENTRY_CNT ; i ++ ) { cache . localEvict ( Collections . singleton ( i ) ) ; assertEquals ( ENTRY_CNT - i - 1 , cache . localSize ( CachePeekMode . ONHEAP ) ) ; assertEquals ( i + 1 , cache . localSize ( CachePeekMode . OFFHEAP ) ) ; } assertEquals ( 0 , cache . localSize ( CachePeekMode . ONHEAP ) ) ; assertEquals ( ENTRY_CNT , cache . localSize ( CachePeekMode . OFFHEAP ) ) ; for ( int i = 0 ; i < ENTRY_CNT ; i ++ ) assertNull ( cache . localPeek ( i , CachePeekMode . ONHEAP ) ) ; assertEquals ( ENTRY_CNT , swapCnt . get ( ) ) ; assertEquals ( 0 , unswapCnt . get ( ) ) ; }
evicts all entries in cache .
