Package org.directmemory.serialization

Examples of org.directmemory.serialization.ProtoStuffSerializer


  public static Split wholeTestSplit = null;
 
  @BeforeClass
  public static void setup() {
    cache = new CacheStore(100, 10 * 1024 * 1024, 1);
    cache.serializer = new ProtoStuffSerializer();
//    cache.supervisor = new AsyncBatchSupervisor(750);
    cache.supervisor = new TimedSupervisor(1500);
  }
View Full Code Here


  private static Logger logger=LoggerFactory.getLogger(BasicProtostuffSingleThreadedTest.class);
 
  @Test public void goOverTheLimitWithProtostuff() {
    int limit = 10;
    CacheStore store = new CacheStore(limit, 1 * 1024 * 1024, 1);
    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);
View Full Code Here

 
 
  @Test public void goOverTheLimitPutAndGetWithProtostuff() {
    int limit = 1000;
    CacheStore cache = new CacheStore(limit, 10 * 1024 * 1024, 1);
    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);
View Full Code Here

TOP

Related Classes of org.directmemory.serialization.ProtoStuffSerializer

Copyright © 2018 www.massapicom. 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.