apex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pra...@apache.org
Subject incubator-apex-core git commit: APEX-223 #resolve Send response to purge/reset requestor on the same thread (defaultEventLoop). Do not explicitly disconnect, wait for the client to decide whether to send more requests or to disconnect.
Date Tue, 27 Oct 2015 21:05:06 GMT
Repository: incubator-apex-core
Updated Branches:
  refs/heads/release-3.2 04c31c803 -> f45b8595d


 APEX-223 #resolve Send response to purge/reset requestor on the same thread (defaultEventLoop).
Do not explicitly disconnect, wait for the client to decide whether to send more requests
or to disconnect.


Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/commit/f45b8595
Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/tree/f45b8595
Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/diff/f45b8595

Branch: refs/heads/release-3.2
Commit: f45b8595d7ee48d790db304ec826e2ba4ba03904
Parents: 04c31c8
Author: Vlad Rozov <v.rozov@datatorrent.com>
Authored: Sun Oct 25 09:30:24 2015 -0700
Committer: Vlad Rozov <v.rozov@datatorrent.com>
Committed: Mon Oct 26 20:44:51 2015 -0700

----------------------------------------------------------------------
 .../datatorrent/bufferserver/server/Server.java | 24 +++-----------------
 1 file changed, 3 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/f45b8595/bufferserver/src/main/java/com/datatorrent/bufferserver/server/Server.java
----------------------------------------------------------------------
diff --git a/bufferserver/src/main/java/com/datatorrent/bufferserver/server/Server.java b/bufferserver/src/main/java/com/datatorrent/bufferserver/server/Server.java
index cd45738..c4cdf5b 100644
--- a/bufferserver/src/main/java/com/datatorrent/bufferserver/server/Server.java
+++ b/bufferserver/src/main/java/com/datatorrent/bufferserver/server/Server.java
@@ -173,7 +173,7 @@ public class Server implements ServerListener
   private final int blockSize;
   private final int numberOfCacheBlocks;
 
-  public void handlePurgeRequest(PurgeRequestTuple request, final AbstractLengthPrependerClient
ctx) throws IOException
+  private void handlePurgeRequest(PurgeRequestTuple request, final AbstractLengthPrependerClient
ctx) throws IOException
   {
     DataList dl;
     dl = publisherBuffers.get(request.getIdentifier());
@@ -188,16 +188,7 @@ public class Server implements ServerListener
 
     final byte[] tuple = PayloadTuple.getSerializedTuple(0, message.length);
     System.arraycopy(message, 0, tuple, tuple.length - message.length, message.length);
-    serverHelperExecutor.submit(new Runnable()
-    {
-      @Override
-      public void run()
-      {
-        ctx.write(tuple);
-        eventloop.disconnect(ctx);
-      }
-
-    });
+    ctx.write(tuple);
   }
 
   private void handleResetRequest(ResetRequestTuple request, final AbstractLengthPrependerClient
ctx) throws IOException
@@ -219,16 +210,7 @@ public class Server implements ServerListener
 
     final byte[] tuple = PayloadTuple.getSerializedTuple(0, message.length);
     System.arraycopy(message, 0, tuple, tuple.length - message.length, message.length);
-    serverHelperExecutor.submit(new Runnable()
-    {
-      @Override
-      public void run()
-      {
-        ctx.write(tuple);
-        eventloop.disconnect(ctx);
-      }
-
-    });
+    ctx.write(tuple);
   }
 
   /**


Mime
View raw message