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());
}