You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/03/09 20:46:16 UTC
[09/18] incubator-tinkerpop git commit: Allowed
maxWaitForSessionClose to get assigned from the Cluster builder.
Allowed maxWaitForSessionClose to get assigned from the Cluster builder.
This setting was defined through Settings but were not passed along to the Cluster builder.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/7ebd46cd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/7ebd46cd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/7ebd46cd
Branch: refs/heads/master
Commit: 7ebd46cd5fc78e6ce0e6ea58ba1d2cb999284c10
Parents: d07eb59
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Mar 2 16:34:14 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Mar 2 16:34:14 2016 -0500
----------------------------------------------------------------------
.../org/apache/tinkerpop/gremlin/driver/Cluster.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/7ebd46cd/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java
index b29cc95..02181e2 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java
@@ -278,6 +278,7 @@ public final class Cluster {
private int maxInProcessPerConnection = Connection.MAX_IN_PROCESS;
private int minInProcessPerConnection = Connection.MIN_IN_PROCESS;
private int maxWaitForConnection = Connection.MAX_WAIT_FOR_CONNECTION;
+ private int maxWaitForSessionClose = Connection.MAX_WAIT_FOR_SESSION_CLOSE;
private int maxContentLength = Connection.MAX_CONTENT_LENGTH;
private int reconnectInitialDelay = Connection.RECONNECT_INITIAL_DELAY;
private int reconnectInterval = Connection.RECONNECT_INTERVAL;
@@ -442,6 +443,16 @@ public final class Cluster {
}
/**
+ * If the connection is using a "session" this setting represents the amount of time in milliseconds to wait
+ * for that session to close before timing out where the default value is 3000. Note that the server will
+ * eventually clean up dead sessions itself on expiration of the session or during shutdown.
+ */
+ public Builder maxWaitForSessionClose(final int maxWait) {
+ this.maxWaitForSessionClose = maxWait;
+ return this;
+ }
+
+ /**
* The maximum size in bytes of any request sent to the server. This number should not exceed the same
* setting defined on the server.
*/
@@ -569,6 +580,7 @@ public final class Cluster {
connectionPoolSettings.maxSize = this.maxConnectionPoolSize;
connectionPoolSettings.minSize = this.minConnectionPoolSize;
connectionPoolSettings.maxWaitForConnection = this.maxWaitForConnection;
+ connectionPoolSettings.maxWaitForSessionClose = this.maxWaitForSessionClose;
connectionPoolSettings.maxContentLength = this.maxContentLength;
connectionPoolSettings.reconnectInitialDelay = this.reconnectInitialDelay;
connectionPoolSettings.reconnectInterval = this.reconnectInterval;