avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r1074338 - in /avro/trunk: CHANGES.txt lang/java/ipc/src/main/java/org/apache/avro/ipc/NettyTransceiver.java
Date Thu, 24 Feb 2011 22:53:59 GMT
Author: cutting
Date: Thu Feb 24 22:53:59 2011
New Revision: 1074338

URL: http://svn.apache.org/viewvc?rev=1074338&view=rev
Log:
AVRO-754. Java: Permit passing custom channel factory to NettyTransceiver.  Contributed by
Bruno Dumon.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/java/ipc/src/main/java/org/apache/avro/ipc/NettyTransceiver.java

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1074338&r1=1074337&r2=1074338&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Thu Feb 24 22:53:59 2011
@@ -182,6 +182,9 @@ Avro 1.5.0 (unreleased)
 
     AVRO-774. Java: Clean up repositories in pom.xml. (Lars Francke via cutting)
 
+    AVRO-754. Java: Permit passing custom channel factory to NettyTransceiver.
+    (Bruno Dumon via cutting)
+
   BUG FIXES
 
     AVRO-764. Java: Bug in BinaryData.compare() with offset comparison.

Modified: avro/trunk/lang/java/ipc/src/main/java/org/apache/avro/ipc/NettyTransceiver.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/ipc/src/main/java/org/apache/avro/ipc/NettyTransceiver.java?rev=1074338&r1=1074337&r2=1074338&view=diff
==============================================================================
--- avro/trunk/lang/java/ipc/src/main/java/org/apache/avro/ipc/NettyTransceiver.java (original)
+++ avro/trunk/lang/java/ipc/src/main/java/org/apache/avro/ipc/NettyTransceiver.java Thu Feb
24 22:53:59 2011
@@ -73,9 +73,13 @@ public class NettyTransceiver extends Tr
   NettyTransceiver() {}
   
   public NettyTransceiver(InetSocketAddress addr) {
+    this(addr, new NioClientSocketChannelFactory(Executors.
+        newCachedThreadPool(), Executors.newCachedThreadPool()));
+  }
+
+  public NettyTransceiver(InetSocketAddress addr, ChannelFactory channelFactory) {
     // Set up.
-    channelFactory = new NioClientSocketChannelFactory(Executors
-        .newCachedThreadPool(), Executors.newCachedThreadPool());
+    this.channelFactory = channelFactory;
     ClientBootstrap bootstrap = new ClientBootstrap(channelFactory);
 
     // Configure the event pipeline factory.



Mime
View raw message