/** * Verify that the mru gets used by a non-defined region when it is set as the default in the * default region. * <p> * @throws CacheException */ public void testLoadFromCCF() throws CacheException { CacheAccess<String, String> cache = JCS.getInstance( "testLoadFromCCF" ); String memoryCacheName = cache.getCacheAttributes().getMemoryCacheName(); assertTrue( "Cache name should have LHMLRU in it.", memoryCacheName.indexOf( "LHMLRUMemoryCache" ) != -1 ); }
/** * Verify that the mru gets used by a non-defined region when it is set as the default in the * default region. * <p> * @throws CacheException */ public void testLoadFromCCF() throws CacheException { CacheAccess<String, String> cache = JCS.getInstance( "testLoadFromCCF" ); String memoryCacheName = cache.getCacheAttributes().getMemoryCacheName(); assertTrue( "Cache name should have LHMLRU in it.", memoryCacheName.indexOf( "LHMLRUMemoryCache" ) != -1 ); }
/** * Get stats. * <p> * @throws CacheException */ public void testGetStatsThroughHub() throws CacheException { CacheAccess<String, String> cache = JCS.getInstance( "testGetStatsThroughHub" ); int max = cache.getCacheAttributes().getMaxObjects(); int items = max * 2; for ( int i = 0; i < items; i++ ) { cache.put( i + ":key", "myregion" + " data " + i ); } String stats = cache.getStats(); //System.out.println( stats ); // TODO improve stats check assertTrue( "Should have 200 puts" + stats, stats.indexOf( "200" ) != -1 ); }
/** * Get stats. * <p> * @throws CacheException */ public void testGetStatsThroughHub() throws CacheException { CacheAccess<String, String> cache = JCS.getInstance( "testGetStatsThroughHub" ); int max = cache.getCacheAttributes().getMaxObjects(); int items = max * 2; for ( int i = 0; i < items; i++ ) { cache.put( i + ":key", "myregion" + " data " + i ); } String stats = cache.getStats(); //System.out.println( stats ); // TODO improve stats check assertTrue( "Should have 200 puts" + stats, stats.indexOf( "200" ) != -1 ); }