예제 #1
0
  @Test
  public void persistantTest() {
    initCache();

    WorldChunk chunk = testEnv.getWorldLayer(0).get_cached_chunk(0, 0);
    Element element = new Element(1, chunk);
    persistantCache.put(element);

    persistantCache.flush();
    cacheManager.shutdown();

    initCache();

    int diskStore = persistantCache.getDiskStoreSize();
    Assert.assertEquals(diskStore, 1);

    Element persistantElem = persistantCache.get(1);
    WorldChunk persChunk = (WorldChunk) persistantElem.getValue();
  }
 public int getDiskStoreSize() {
   return cache.getDiskStoreSize();
 }