Examples of heapEntriesCount()


Examples of org.directmemory.CacheStore.heapEntriesCount()

    store.serializer = new ProtoStuffSerializer();
    for (int i = 1; i <= limit * 2; i++) {
      DummyPojo pojo = new  DummyPojo("test" + 1, 1024);
      store.put("test" + i, pojo);
      if (i <= limit) {
        assertEquals(store.heapEntriesCount(), i);
      } else {
        assertEquals(limit, store.heapEntriesCount());
      }
      logger.debug("goOverTheLimit " + store);
    }
View Full Code Here

Examples of org.directmemory.CacheStore.heapEntriesCount()

      DummyPojo pojo = new  DummyPojo("test" + 1, 1024);
      store.put("test" + i, pojo);
      if (i <= limit) {
        assertEquals(store.heapEntriesCount(), i);
      } else {
        assertEquals(limit, store.heapEntriesCount());
      }
      logger.debug("goOverTheLimit " + store);
    }
    CacheStore.displayTimings();
  }
View Full Code Here

Examples of org.directmemory.CacheStore.heapEntriesCount()

    cache.serializer = new ProtoStuffSerializer();
    for (int i = 1; i <= limit * 1.5; i++) {
      DummyPojo pojo = new  DummyPojo("test" + i, 1024);
      cache.put("test" + i, pojo);
      if (i <= limit) {
        assertEquals(cache.heapEntriesCount(), i);
      } else {
        assertEquals(limit, cache.heapEntriesCount());
      }
    }

View Full Code Here

Examples of org.directmemory.CacheStore.heapEntriesCount()

      DummyPojo pojo = new  DummyPojo("test" + i, 1024);
      cache.put("test" + i, pojo);
      if (i <= limit) {
        assertEquals(cache.heapEntriesCount(), i);
      } else {
        assertEquals(limit, cache.heapEntriesCount());
      }
    }

    logger.debug("goOverTheLimitPutAndGet " + cache.toString());
   
View Full Code Here

Examples of org.directmemory.CacheStore.heapEntriesCount()

      DummyPojo pojo = new  DummyPojo("test" + i, 1024);
      @SuppressWarnings("unused")
      DummyPojo newPojo = (DummyPojo)cache.get("test" + i);
    }
   
    assertEquals(limit, cache.heapEntriesCount());
//    assertEquals(518500, cache.usedMemory());
  }
 
 
  @AfterClass
View Full Code Here

Examples of org.directmemory.CacheStore.heapEntriesCount()

//    cache.serializer = new ProtoStuffSerializer();
    for (int i = 1; i <= limit * 2; i++) {
      DummyPojo pojo = new  DummyPojo("test" + i, randomSize());
      cache.put("test" + i, pojo);
      if (i <= limit) {
        assertEquals(i, cache.heapEntriesCount());
      } else {
        assertEquals(limit, cache.heapEntriesCount());
      }
    }

View Full Code Here

Examples of org.directmemory.CacheStore.heapEntriesCount()

      DummyPojo pojo = new  DummyPojo("test" + i, randomSize());
      cache.put("test" + i, pojo);
      if (i <= limit) {
        assertEquals(i, cache.heapEntriesCount());
      } else {
        assertEquals(limit, cache.heapEntriesCount());
      }
    }

    logger.debug("goOverTheLimitPutAndGet " + cache.toString());
   
View Full Code Here

Examples of org.directmemory.CacheStore.heapEntriesCount()

    CacheStore cache = new CacheStore(limit, 1 * 1024 * 1024, 1);
   
    for (int i = 1; i <= limit; i++) {
      cache.put("test" + i, new DummyPojo("test" + 1, 1024));
      if (i < limit) {
        assert(limit >= cache.heapEntriesCount());
      }
      logger.debug("reachLimit " + cache);
    }
    cache.reset();
  }
View Full Code Here

Examples of org.directmemory.CacheStore.heapEntriesCount()

    CacheStore cache = new CacheStore(limit, 1 * 1024 * 1024, 1);
    for (int i = 1; i <= limit * 2; i++) {
      DummyPojo pojo = new  DummyPojo("test" + i, 1024);
      cache.put("test" + i, pojo);
      if (i <= limit ) {
        assertEquals(i, cache.heapEntriesCount());
      } else {
        assertEquals(limit, cache.heapEntriesCount());
      }
      logger.debug("goOverTheLimit " + cache);
    }
View Full Code Here

Examples of org.directmemory.CacheStore.heapEntriesCount()

      DummyPojo pojo = new  DummyPojo("test" + i, 1024);
      cache.put("test" + i, pojo);
      if (i <= limit ) {
        assertEquals(i, cache.heapEntriesCount());
      } else {
        assertEquals(limit, cache.heapEntriesCount());
      }
      logger.debug("goOverTheLimit " + cache);
    }
    cache.reset();   
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.