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 20:55:15 GMT
Repository: incubator-apex-core
Updated Branches:
  refs/heads/release-3.1 6916ee616 -> 2d7e3599a


 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/2d7e3599
Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/tree/2d7e3599
Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/diff/2d7e3599

Branch: refs/heads/release-3.1
Commit: 2d7e3599ae71f195b7543f9e63ec4201c508282a
Parents: 6916ee6
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:50:15 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/2d7e3599/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 7fb4823..adb4371 100644
--- a/bufferserver/src/main/java/com/datatorrent/bufferserver/server/Server.java
+++ b/bufferserver/src/main/java/com/datatorrent/bufferserver/server/Server.java
@@ -162,7 +162,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());
@@ -178,16 +178,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
@@ -210,16 +201,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