You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jf...@apache.org on 2015/06/24 15:21:45 UTC

thrift git commit: THRIFT-3197: keepAliveTime is hard coded as 60 sec in TThreadPoolServer Client: java Patch: Pankaj Kumar

Repository: thrift
Updated Branches:
  refs/heads/master 763841b4d -> 0b8132d20


THRIFT-3197: keepAliveTime is hard coded as 60 sec in TThreadPoolServer
Client: java
Patch: Pankaj Kumar

Creating ThreadPoolExecutor in TThreadPoolServer, keepAliveTime is hard coded as 60 sec.


Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/0b8132d2
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/0b8132d2
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/0b8132d2

Branch: refs/heads/master
Commit: 0b8132d20ea691c56f0fe973072a58086999a4d8
Parents: 763841b
Author: jfarrell <jf...@apache.org>
Authored: Wed Jun 24 09:19:15 2015 -0400
Committer: jfarrell <jf...@apache.org>
Committed: Wed Jun 24 09:19:15 2015 -0400

----------------------------------------------------------------------
 lib/java/src/org/apache/thrift/server/TThreadPoolServer.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/0b8132d2/lib/java/src/org/apache/thrift/server/TThreadPoolServer.java
----------------------------------------------------------------------
diff --git a/lib/java/src/org/apache/thrift/server/TThreadPoolServer.java b/lib/java/src/org/apache/thrift/server/TThreadPoolServer.java
index 65257ec..a963bc9 100755
--- a/lib/java/src/org/apache/thrift/server/TThreadPoolServer.java
+++ b/lib/java/src/org/apache/thrift/server/TThreadPoolServer.java
@@ -70,6 +70,11 @@ public class TThreadPoolServer extends TServer {
       return this;
     }
 
+    public Args stopTimeoutVal(int n) {
+      stopTimeoutVal = n;
+      return this;
+    }
+
     public Args requestTimeout(int n) {
       requestTimeout = n;
       return this;
@@ -130,7 +135,7 @@ public class TThreadPoolServer extends TServer {
       new SynchronousQueue<Runnable>();
     return new ThreadPoolExecutor(args.minWorkerThreads,
                                   args.maxWorkerThreads,
-                                  60,
+                                  args.stopTimeoutVal,
                                   TimeUnit.SECONDS,
                                   executorQueue);
   }