Package org.directmemory.impl

Examples of org.directmemory.impl.CacheStoreImpl


  private static void belowLimit(int cacheSize, ICacheSupervisor supervisor) throws IOException, ClassNotFoundException {

    Long startedAt = Calendar.getInstance().getTimeInMillis();
   
    ICacheStore cache = new CacheStoreImpl(-1, cacheSize);
    cache.setSupervisor(supervisor);

    logger.debug("started");
      for (int i = 0; i < cacheSize / 1024 / 1.25; i++) {
        cache.put("test" + i, new DummyObject("test"+i, 1024));
//        DummyObject retrObj = (DummyObject)cache.retrieveObject("test"+i);
//        logger.debug(retrObj.getName());
      }
     
      Long finishedAt = Calendar.getInstance().getTimeInMillis();
   
      logger.debug("finished in " + (finishedAt - startedAt) + " msecs");
      logger.debug("" + cache.toString());

      cache.dispose();

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


 
  private static void aboveLimit(int cacheSize, ICacheSupervisor supervisor) throws IOException, ClassNotFoundException {

    Long startedAt = Calendar.getInstance().getTimeInMillis();
   
    ICacheStore cache = new CacheStoreImpl(-1, cacheSize);
    cache.setSupervisor(supervisor);

    logger.debug("started");
      for (int i = 0; i < cacheSize / 1024; i++) {
        cache.put("test" + i, new DummyObject("test"+i, 1024));
//        DummyObject retrObj = (DummyObject)cache.retrieveObject("test"+i);
//        logger.debug(retrObj.getName());
      }
     
      Long finishedAt = Calendar.getInstance().getTimeInMillis();
   
      logger.debug("finished in " + (finishedAt - startedAt) + " msecs");
      logger.debug("" + cache.toString());

      cache.dispose();

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

    if (mb2useFromCommandLine != null) {
      logger.debug("using mb2useFromCommandLine=" + mb2useFromCommandLine);
      cacheSize = new Integer(mb2useFromCommandLine)*1024*1024;
      logger.debug("cacheSize=" + cacheSize);
    }
    cache = new CacheStoreImpl(-1, cacheSize);
//    cache.setDefaultDuration(1000);
    logger.debug(cache.toString());
  }
View Full Code Here

  private void belowLimit(int cacheSize, ICacheSupervisor supervisor) throws IOException, ClassNotFoundException {

    Long startedAt = Calendar.getInstance().getTimeInMillis();
   
    ICacheStore cache = new CacheStoreImpl(-1, cacheSize);
    cache.setSupervisor(supervisor);

    logger.debug("started");
      for (int i = 0; i < cacheSize / 1024 / 1.25; i++) {
        cache.put("test" + i, new DummyObject("test"+i, 1024));
//        DummyObject retrObj = (DummyObject)cache.retrieveObject("test"+i);
//        logger.debug(retrObj.getName());
      }
     
      Long finishedAt = Calendar.getInstance().getTimeInMillis();
   
      logger.debug("finished in " + (finishedAt - startedAt) + " msecs");
      logger.debug("" + cache.toString());

      cache.dispose();

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

 
  private void aboveLimit(int cacheSize, ICacheSupervisor supervisor) throws IOException, ClassNotFoundException {

    Long startedAt = Calendar.getInstance().getTimeInMillis();
   
    ICacheStore cache = new CacheStoreImpl(-1, cacheSize);
    cache.setSupervisor(supervisor);

    logger.debug("started");
      for (int i = 0; i < cacheSize / 1024; i++) {
        cache.put("test" + i, new DummyObject("test"+i, 1024));
      }
     
      Long finishedAt = Calendar.getInstance().getTimeInMillis();
   
      logger.debug("finished in " + (finishedAt - startedAt) + " msecs");
      logger.debug("" + cache.toString());

      cache.dispose();

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

TOP

Related Classes of org.directmemory.impl.CacheStoreImpl

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.