apex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vro...@apache.org
Subject [01/11] 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 Mon, 02 Nov 2015 15:49:48 GMT
Repository: incubator-apex-core
Updated Branches:
  refs/heads/feature-module 4ce1b365e -> 013ccbeee


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

Branch: refs/heads/feature-module
Commit: aa288871c9e8cc0313becf63a9be129b3e42e083
Parents: 7f1f81f
Author: Vlad Rozov <v.rozov@datatorrent.com>
Authored: Sun Oct 25 09:30:24 2015 -0700
Committer: Vlad Rozov <v.rozov@datatorrent.com>
Committed: Sun Oct 25 09:30:24 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/aa288871/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