cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giac...@apache.org
Subject svn commit: r359139 - in /cocoon/trunk/src/java/org/apache/cocoon/core/container/handler: NonThreadSafePoolableComponentHandler.java PoolableComponentHandlerMBean.java mbean.properties
Date Mon, 26 Dec 2005 23:59:44 GMT
Author: giacomo
Date: Mon Dec 26 15:59:24 2005
New Revision: 359139

URL: http://svn.apache.org/viewcvs?rev=359139&view=rev
Log:
Better naming

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

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/NonThreadSafePoolableComponentHandler.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/NonThreadSafePoolableComponentHandler.java?rev=359139&r1=359138&r2=359139&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/NonThreadSafePoolableComponentHandler.java
(original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/NonThreadSafePoolableComponentHandler.java
Mon Dec 26 15:59:24 2005
@@ -84,6 +84,11 @@
      * Total number of Poolable instances in the pool
      */
     private int size;
+
+    /**
+     * Total number of Poolable instances created 
+     */
+    private int highWaterMark;
     
     /**
      * Create a PoolableComponentHandler which manages a pool of Components
@@ -164,6 +169,7 @@
                 //  instantiated.
                 poolable = this.factory.newInstance();
                 this.size++;
+                this.highWaterMark = (this.highWaterMark < this.size ? this.size : this.highWaterMark);
 
                 if ( this.logger.isDebugEnabled() ) {
                     this.logger.debug( "Created a new " + poolable.getClass().getName()
@@ -267,5 +273,13 @@
     protected int getSize()
     {
         return size;
+    }
+
+    /**
+     * @return Returns the highWaterMark.
+     */
+    protected int getHighWaterMark()
+    {
+        return highWaterMark;
     }
 }

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/PoolableComponentHandlerMBean.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/PoolableComponentHandlerMBean.java?rev=359139&r1=359138&r2=359139&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/PoolableComponentHandlerMBean.java
(original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/container/handler/PoolableComponentHandlerMBean.java
Mon Dec 26 15:59:24 2005
@@ -42,6 +42,7 @@
         defineAttribute("maxPoolSize", false, true);
         defineAttribute("readyPoolSize", false, true);
         defineAttribute("totalPoolSize", false, true);
+        defineAttribute("maxCreated", false, true);
     }
     /**
      * Construction of PoolableComponentHandlerMBean
@@ -86,6 +87,11 @@
         return handler.getReadySize();
     }
 
+    public int getHighWaterMark()
+    {
+        return handler.getHighWaterMark();
+    }
+
     public int getTotalPoolSize()
     {
         return handler.getSize();
@@ -98,6 +104,6 @@
  
     public String getJmxNameAddition()
     {
-        return "handler=poolable"; 
+        return "type=PoolableHandler"; 
     }
 }

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=359139&r1=359138&r2=359139&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 Mon Dec
26 15:59:24 2005
@@ -4,4 +4,5 @@
 PoolableComponentHandler.defaultMaxPoolSize = The Default maximum pool size
 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
\ No newline at end of file
+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



Mime
View raw message