You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ro...@apache.org on 2015/12/08 20:11:43 UTC

[2/2] thrift git commit: THRIFT-3478 restore method to THsHaServer

THRIFT-3478 restore method to THsHaServer

This closes #735


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

Branch: refs/heads/master
Commit: 3143bfbe15b42c758aa627ef402b21cbb1245851
Parents: 84cf363
Author: Keith Turner <kt...@apache.org>
Authored: Tue Dec 8 11:14:01 2015 -0500
Committer: Roger Meier <ro...@bufferoverflow.ch>
Committed: Tue Dec 8 20:11:20 2015 +0100

----------------------------------------------------------------------
 .../org/apache/thrift/server/THsHaServer.java   | 22 ++++++++++++++++++++
 1 file changed, 22 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/thrift/blob/3143bfbe/lib/java/src/org/apache/thrift/server/THsHaServer.java
----------------------------------------------------------------------
diff --git a/lib/java/src/org/apache/thrift/server/THsHaServer.java b/lib/java/src/org/apache/thrift/server/THsHaServer.java
index 2ef4b83..2414e49 100644
--- a/lib/java/src/org/apache/thrift/server/THsHaServer.java
+++ b/lib/java/src/org/apache/thrift/server/THsHaServer.java
@@ -45,6 +45,28 @@ public class THsHaServer extends TNonblockingServer {
       super(transport);
     }
 
+
+    /**
+     * Sets the min and max threads.
+     *
+     * @deprecated use {@link #minWorkerThreads(int)} and {@link #maxWorkerThreads(int)}  instead.
+     */
+    @Deprecated
+    public Args workerThreads(int n) {
+      minWorkerThreads = n;
+      maxWorkerThreads = n;
+      return this;
+    }
+
+    /**
+     * @return what the min threads was set to.
+     * @deprecated use {@link #getMinWorkerThreads()} and {@link #getMaxWorkerThreads()} instead.
+     */
+    @Deprecated
+    public int getWorkerThreads() {
+      return minWorkerThreads;
+    }
+
     public Args minWorkerThreads(int n) {
       minWorkerThreads = n;
       return this;