cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giac...@apache.org
Subject svn commit: r359234 - in /cocoon/trunk/src/java/org/apache/cocoon/core/container/handler: SingleThreadedComponentHandler.java mbean.properties
Date Tue, 27 Dec 2005 16:27:45 GMT
Author: giacomo
Date: Tue Dec 27 08:27:41 2005
New Revision: 359234

URL: http://svn.apache.org/viewcvs?rev=359234&view=rev
Log:
added MBean

Modified:
    cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/SingleThreadedComponentHandler.java
    cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/mbean.properties

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/SingleThreadedComponentHandler.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/SingleThreadedComponentHandler.java?rev=359234&r1=359233&r2=359234&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/SingleThreadedComponentHandler.java
(original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/SingleThreadedComponentHandler.java
Tue Dec 27 08:27:41 2005
@@ -30,6 +30,9 @@
 public class SingleThreadedComponentHandler
 extends AbstractFactoryHandler {
 
+    private long maxCreated = 0;
+    private long maxDecommissioned = 0;
+    
     /**
      * Create a SingleThreadedComponentHandler which manages a pool of Components
      *  created by the specified factory object.
@@ -54,6 +57,7 @@
      */
     protected Object doGet()
     throws Exception {
+        maxCreated++;
         return this.factory.newInstance();
     }
 
@@ -64,10 +68,27 @@
      */
     protected void doPut( final Object component ) {
         this.decommission( component );
+        maxDecommissioned++;
     }
     
     protected void doInitialize() {
         // nothing to do here
+    }
+
+    /**
+     * @return Returns the maxCreated.
+     */
+    public long getMaxCreated()
+    {
+        return maxCreated;
+    }
+
+    /**
+     * @return Returns the maxDecommisioned.
+     */
+    public long getMaxDecommissioned()
+    {
+        return maxDecommissioned;
     }
 
 }

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/mbean.properties
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/mbean.properties?rev=359234&r1=359233&r2=359234&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/mbean.properties (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/mbean.properties Tue Dec
27 08:27:41 2005
@@ -5,4 +5,12 @@
 PoolableComponentHandler.maxPoolSize = The configured maximum pool size
 PoolableComponentHandler.readyPoolSize = The number of Components ready to be used
 PoolableComponentHandler.totalPoolSize = The total number of Components in the pool
-PoolableComponentHandler.highWaterMark = The high water mark of Components created
\ No newline at end of file
+PoolableComponentHandler.highWaterMark = The high water mark of Components created
+PoolableComponentHandler.role = The role name of the Component managed by his pool
+
+
+SingleThreadedComponentHandler = Handles Creation/Decomission of single threaded Components
+
+SingleThreadedComponentHandler.maxCreated = The current numbers of Components created
+SingleThreadedComponentHandler.maxDecommissioned = The current numbers of Components Decomissioned
+SingleThreadedComponentHandler.outstanding = Number of Components theoretically in use
\ No newline at end of file



Mime
View raw message