geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1380805 - /geronimo/server/branches/3.0/framework/modules/geronimo-core/src/main/java/org/apache/geronimo/pool/ThreadPool.java
Date Tue, 04 Sep 2012 18:40:57 GMT
Author: gawor
Date: Tue Sep  4 18:40:57 2012
New Revision: 1380805

URL: http://svn.apache.org/viewvc?rev=1380805&view=rev
Log:
GERONIMO-6385: Expose methods to adjust thread pool size at runtime

Modified:
    geronimo/server/branches/3.0/framework/modules/geronimo-core/src/main/java/org/apache/geronimo/pool/ThreadPool.java

Modified: geronimo/server/branches/3.0/framework/modules/geronimo-core/src/main/java/org/apache/geronimo/pool/ThreadPool.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0/framework/modules/geronimo-core/src/main/java/org/apache/geronimo/pool/ThreadPool.java?rev=1380805&r1=1380804&r2=1380805&view=diff
==============================================================================
--- geronimo/server/branches/3.0/framework/modules/geronimo-core/src/main/java/org/apache/geronimo/pool/ThreadPool.java
(original)
+++ geronimo/server/branches/3.0/framework/modules/geronimo-core/src/main/java/org/apache/geronimo/pool/ThreadPool.java
Tue Sep  4 18:40:57 2012
@@ -139,6 +139,30 @@ public class ThreadPool implements Geron
         stats.setStartTime();
     }
 
+    public int getMinPoolSize() {
+        return executor.getCorePoolSize();
+    }
+
+    public void setMinPoolSize(int size) {
+        executor.setCorePoolSize(size);
+    }
+
+    public int getMaxPoolSize() {
+        return executor.getMaximumPoolSize();
+    }
+
+    public void setMaxPoolSize(int size) {
+        executor.setMaximumPoolSize(size);
+    }
+
+    public void setKeepAliveTime(long time) {
+        executor.setKeepAliveTime(time, TimeUnit.MILLISECONDS);
+    }
+
+    public long getKeepAliveTime() {
+        return executor.getKeepAliveTime(TimeUnit.MILLISECONDS);
+    }
+
     public static class PoolStatsImpl extends StatsImpl implements ThreadPoolStats {
         private BoundedRangeStatisticImpl threadsInUse = new BoundedRangeStatisticImpl(
                 "Threads In Use", "",



Mime
View raw message