You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by as...@apache.org on 2005/01/06 02:27:44 UTC
cvs commit: jakarta-turbine-jcs/auxiliary-builds/jdk14 project.properties
asmuts 2005/01/05 17:27:44
Modified: src/java/org/apache/jcs/auxiliary/lateral
LateralCacheNoWait.java
auxiliary-builds/jdk14 project.properties
Log:
Put in a solution for the RMI bug. Now, gets can be done asynchronously with a configurable timeout.
You can specify that your remote region should timeout gets.
see the cache.ccf in the src/conf for details
Revision Changes Path
1.9 +38 -1 jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheNoWait.java
Index: LateralCacheNoWait.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/lateral/LateralCacheNoWait.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- LateralCacheNoWait.java 16 Jul 2004 01:27:42 -0000 1.8
+++ LateralCacheNoWait.java 6 Jan 2005 01:27:44 -0000 1.9
@@ -19,6 +19,9 @@
import java.io.IOException;
import java.io.Serializable;
import java.rmi.UnmarshalException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
import java.util.Set;
import org.apache.commons.logging.Log;
@@ -30,6 +33,10 @@
import org.apache.jcs.engine.CacheEventQueue;
import org.apache.jcs.engine.behavior.ICacheElement;
import org.apache.jcs.engine.behavior.ICacheEventQueue;
+import org.apache.jcs.engine.stats.StatElement;
+import org.apache.jcs.engine.stats.Stats;
+import org.apache.jcs.engine.stats.behavior.IStatElement;
+import org.apache.jcs.engine.stats.behavior.IStats;
//import org.apache.jcs.auxiliary.lateral.socket.tcp.*;
@@ -244,6 +251,36 @@
*/
public String getStats()
{
- return "";
+ return getStatistics().toString();
}
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jcs.auxiliary.AuxiliaryCache#getStatistics()
+ */
+ public IStats getStatistics()
+ {
+ IStats stats = new Stats();
+ stats.setTypeName( "Lateral Cache No Wait" );
+
+ ArrayList elems = new ArrayList();
+
+ IStatElement se = null;
+
+ // no data gathered here
+
+ // get the stats from the event queue too
+ // get as array, convert to list, add list to our outer list
+ IStats eqStats = this.q.getStatistics();
+ IStatElement[] eqSEs = eqStats.getStatElements();
+ List eqL = Arrays.asList(eqSEs);
+ elems.addAll( eqL );
+
+ // get an array and put them in the Stats object
+ IStatElement[] ses = (IStatElement[]) elems.toArray( new StatElement[0] );
+ stats.setStatElements( ses );
+
+ return stats;
+ }
}
1.3 +1 -1 jakarta-turbine-jcs/auxiliary-builds/jdk14/project.properties
Index: project.properties
===================================================================
RCS file: /home/cvs/jakarta-turbine-jcs/auxiliary-builds/jdk14/project.properties,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- project.properties 23 Jul 2004 12:36:35 -0000 1.2
+++ project.properties 6 Jan 2005 01:27:44 -0000 1.3
@@ -1,3 +1,3 @@
maven.jar.override = on
maven.junit.fork = true
-maven.jar.jcs = ${basedir}../../../target/jcs-1.1-dev.jar
+maven.jar.jcs = ${basedir}/../../target/jcs-1.1.3-dev.jar
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org