camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [2/3] camel git commit: CAMEL-8031 Fixed the issue of maximumPoolSize option is ignored
Date Fri, 14 Nov 2014 11:38:43 GMT
CAMEL-8031 Fixed the issue of maximumPoolSize option is ignored


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/82e58a1a
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/82e58a1a
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/82e58a1a

Branch: refs/heads/master
Commit: 82e58a1a4e20c141aabed35853a41cf30c9a4d56
Parents: b16446f
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Fri Nov 14 17:28:33 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Fri Nov 14 19:38:25 2014 +0800

----------------------------------------------------------------------
 .../org/apache/camel/component/netty/NettyComponent.java | 11 ++++++++++-
 .../apache/camel/component/netty/NettyConfiguration.java |  2 +-
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/82e58a1a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyComponent.java
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyComponent.java
index 810ea8d..3954e2e 100644
--- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyComponent.java
+++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyComponent.java
@@ -35,6 +35,7 @@ public class NettyComponent extends UriEndpointComponent {
     // use a shared timer for Netty (see javadoc for HashedWheelTimer)
     private static volatile Timer timer;
     private NettyConfiguration configuration;
+    private int maximumPoolSize = 16;
     private OrderedMemoryAwareThreadPoolExecutor executorService;
 
     public NettyComponent() {
@@ -95,6 +96,14 @@ public class NettyComponent extends UriEndpointComponent {
         this.configuration = configuration;
     }
 
+    public int getMaximumPoolSize() {
+        return maximumPoolSize;
+    }
+
+    public void setMaximumPoolSize(int maximumPoolSize) {
+        this.maximumPoolSize = maximumPoolSize;
+    }
+
     public static Timer getTimer() {
         return timer;
     }
@@ -131,7 +140,7 @@ public class NettyComponent extends UriEndpointComponent {
         // we should use a shared thread pool as recommended by Netty
         String pattern = getCamelContext().getExecutorServiceManager().getThreadNamePattern();
         ThreadFactory factory = new CamelThreadFactory(pattern, "NettyOrderedWorker", true);
-        return new OrderedMemoryAwareThreadPoolExecutor(configuration.getMaximumPoolSize(),
+        return new OrderedMemoryAwareThreadPoolExecutor(getMaximumPoolSize(),
                 0L, 0L, 30, TimeUnit.SECONDS, factory);
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/82e58a1a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
index f3999a7..b232511 100644
--- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
+++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
@@ -76,7 +76,7 @@ public class NettyConfiguration extends NettyServerBootstrapConfiguration
implem
     private boolean allowDefaultCodec = true;
     @UriParam
     private ClientPipelineFactory clientPipelineFactory;
-    @UriParam
+    //CAMEL-8031 Moved this option to NettyComponent
     private int maximumPoolSize = 16;
     @UriParam
     private boolean orderedThreadPoolExecutor = true;


Mime
View raw message