asmuts 2004/07/09 20:51:20
Modified: src/test/org/apache/jcs/access TestCacheAccess.java
Log:
added stats and shutDown
Revision Changes Path
1.8 +13 -3
jakarta-turbine-jcs/src/test/org/apache/jcs/access/TestCacheAccess.java
Index: TestCacheAccess.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-jcs/src/test/org/apache/jcs/access/TestCacheAccess.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TestCacheAccess.java 30 Jun 2004 02:44:09 -0000 1.7
+++ TestCacheAccess.java 10 Jul 2004 03:51:20 -0000 1.8
@@ -29,6 +29,7 @@
import org.apache.commons.logging.LogFactory;
import org.apache.jcs.engine.control.event.TestElementEventHandler;
+import org.apache.jcs.engine.control.CompositeCache;
import org.apache.jcs.engine.control.CompositeCacheManager;
/**
@@ -136,9 +137,10 @@
String.valueOf( n_end - n_start ) + " millis ---" );
}
else
- if ( message.startsWith( "dispose" ) )
+ if ( message.startsWith( "shutDown" ) )
{
- cache_control.dispose();
+ CompositeCacheManager.getInstance().shutDown();
+ //cache_control.dispose();
notDone = false;
System.exit( -1 );
}
@@ -641,6 +643,14 @@
p( cache_control.toString() );
}
}
+ else
+ if ( message.startsWith( "stats" ) )
+ {
+ CompositeCache cache =
CompositeCacheManager.getInstance().getCache(cache_control.getCacheAttributes().getCacheName());
+ p( cache.getMemoryCache().getStats() );
+ p( "HitCountRam = " + cache.getHitCountRam() );
+ p( "HitCountAux = " + cache.getHitCountAux() );
+ }
}
}
@@ -673,7 +683,7 @@
{
p( "\n\n\n\n" );
- p( "type 'dispose' to dispose of the cache" );
+ p( "type 'shutDown' to shutdown the cache" );
p(
"type 'getm num show[false|true]' to get num automatically from a region" );
p( "type 'putm num' to put num automatically to a region" );
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]