Package org.directmemory

Examples of org.directmemory.ICacheStore


  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

  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.ICacheStore

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.