avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbaldass...@apache.org
Subject svn commit: r1503095 - in /avro/trunk: CHANGES.txt lang/java/ipc/src/main/java/org/apache/avro/ipc/NettyTransceiver.java
Date Mon, 15 Jul 2013 00:53:28 GMT
Author: jbaldassari
Date: Mon Jul 15 00:53:28 2013
New Revision: 1503095

URL: http://svn.apache.org/r1503095
Log:
AVRO-1297. NettyTransceiver: Provide overloaded close(boolean awaitCompletion)

Submitted by:jbaldassari	
Reviewed by:cutting	

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=1503095&r1=1503094&r2=1503095&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Mon Jul 15 00:53:28 2013
@@ -73,6 +73,9 @@ Trunk (not yet released)
     AVRO-1261. Clarify in documentation that generated no-arg
     constructors do not use default values from schema. (cutting)
 
+    AVRO-1297. NettyTransceiver: Provide overloaded 
+    close(boolean awaitCompletion). (jbaldassari)
+
   BUG FIXES
 
     AVRO-1296. Python: Fix schemas retrieved from protocol types

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=1503095&r1=1503094&r2=1503095&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 Mon Jul
15 00:53:28 2013
@@ -398,11 +398,26 @@ public class NettyTransceiver extends Tr
     
   }
 
+  /**
+   * Closes this transceiver and disconnects from the remote peer.
+   * Cancels all pending RPCs, sends an IOException to all pending callbacks, 
+   * and blocks until the close has completed.
+   */
+  @Override
   public void close() {
+    close(true);
+  }
+  
+  /**
+   * Closes this transceiver and disconnects from the remote peer.
+   * Cancels all pending RPCs and sends an IOException to all pending callbacks.
+   * @param awaitCompletion if true, will block until the close has completed.
+   */
+  public void close(boolean awaitCompletion) {
     try {
       // Close the connection:
       stopping = true;
-      disconnect(true, true, null);
+      disconnect(awaitCompletion, true, null);
     } finally {
       // Shut down all thread pools to exit.
       channelFactory.releaseExternalResources();



Mime
View raw message