camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1422962 - in /camel/branches/camel-2.9.x: ./ components/camel-netty/src/main/java/org/apache/camel/component/netty/ components/camel-netty/src/test/java/org/apache/camel/component/netty/
Date Mon, 17 Dec 2012 15:00:53 GMT
Author: davsclaus
Date: Mon Dec 17 15:00:51 2012
New Revision: 1422962

URL: http://svn.apache.org/viewvc?rev=1422962&view=rev
Log:
CAMEL-5886: Added option backlog to camel-netty.

Added:
    camel/branches/camel-2.9.x/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyBacklogTest.java
      - copied unchanged from r1422959, camel/branches/camel-2.10.x/components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyBacklogTest.java
Modified:
    camel/branches/camel-2.9.x/   (props changed)
    camel/branches/camel-2.9.x/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
    camel/branches/camel-2.9.x/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConsumer.java

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1422957
  Merged /camel/branches/camel-2.10.x:r1422959

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.9.x/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java?rev=1422962&r1=1422961&r2=1422962&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
Mon Dec 17 15:00:51 2012
@@ -77,6 +77,7 @@ public class NettyConfiguration implemen
     private ServerPipelineFactory serverPipelineFactory;
     private SSLContextParameters sslContextParameters;
     private boolean needClientAuth;
+    private int backlog;
     
     /**
      * Returns a copy of this configuration
@@ -520,6 +521,14 @@ public class NettyConfiguration implemen
         this.sslContextParameters = sslContextParameters;
     }
 
+    public int getBacklog() {
+        return backlog;
+    }
+
+    public void setBacklog(int backlog) {
+        this.backlog = backlog;
+    }
+
     private static <T> void addToHandlersList(List<T> configured, List<T>
handlers, Class<T> handlerType) {
         if (handlers != null) {
             for (int x = 0; x < handlers.size(); x++) {

Modified: camel/branches/camel-2.9.x/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConsumer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConsumer.java?rev=1422962&r1=1422961&r2=1422962&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConsumer.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConsumer.java
Mon Dec 17 15:00:51 2012
@@ -180,6 +180,13 @@ public class NettyConsumer extends Defau
         serverBootstrap.setOption("reuseAddress", configuration.isReuseAddress());
         serverBootstrap.setOption("child.reuseAddress", configuration.isReuseAddress());
         serverBootstrap.setOption("child.connectTimeoutMillis", configuration.getConnectTimeout());
+        if (configuration.getBacklog() > 0) {
+            serverBootstrap.setOption("backlog", configuration.getBacklog());
+        }
+
+        if (log.isDebugEnabled()) {
+            log.debug("Created ServerBootstrap {} with options: {}", serverBootstrap, serverBootstrap.getOptions());
+        }
 
         // set the pipeline factory, which creates the pipeline for each newly created channels
         serverBootstrap.setPipelineFactory(pipelineFactory);
@@ -210,6 +217,13 @@ public class NettyConsumer extends Defau
             connectionlessServerBootstrap.setOption("receiveBufferSizePredictorFactory",
                 new FixedReceiveBufferSizePredictorFactory(configuration.getReceiveBufferSizePredictor()));
         }
+        if (configuration.getBacklog() > 0) {
+            serverBootstrap.setOption("backlog", configuration.getBacklog());
+        }
+
+        if (log.isDebugEnabled()) {
+            log.debug("Created ConnectionlessBootstrap {} with options: {}", connectionlessServerBootstrap,
connectionlessServerBootstrap.getOptions());
+        }
 
         // set the pipeline factory, which creates the pipeline for each newly created channels
         connectionlessServerBootstrap.setPipelineFactory(pipelineFactory);



Mime
View raw message