From commits-return-32749-archive-asf-public=cust-asf.ponee.io@tinkerpop.apache.org Fri Oct 5 13:37:35 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 842791807A3 for ; Fri, 5 Oct 2018 13:37:33 +0200 (CEST) Received: (qmail 5627 invoked by uid 500); 5 Oct 2018 11:37:24 -0000 Mailing-List: contact commits-help@tinkerpop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tinkerpop.apache.org Delivered-To: mailing list commits@tinkerpop.apache.org Received: (qmail 5301 invoked by uid 99); 5 Oct 2018 11:37:24 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2018 11:37:24 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 91141E11D6; Fri, 5 Oct 2018 11:37:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rdale@apache.org To: commits@tinkerpop.apache.org Date: Fri, 05 Oct 2018 11:37:57 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [35/48] tinkerpop git commit: Merge branch 'tp32' into tp33 Merge branch 'tp32' into tp33 Conflicts: gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Settings.java Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/650d1e84 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/650d1e84 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/650d1e84 Branch: refs/heads/TINKERPOP-2037 Commit: 650d1e84d0b7d6f8a213a67df593c43134e156fe Parents: 2b4c993 b510613 Author: Stephen Mallette Authored: Thu Oct 4 12:11:28 2018 -0400 Committer: Stephen Mallette Committed: Thu Oct 4 12:11:28 2018 -0400 ---------------------------------------------------------------------- CHANGELOG.asciidoc | 1 + .../src/reference/gremlin-applications.asciidoc | 1 + .../tinkerpop/gremlin/driver/Cluster.java | 30 ++++++++++++++++++-- .../gremlin/driver/ConnectionPool.java | 3 +- .../tinkerpop/gremlin/driver/Settings.java | 15 +++++++--- .../tinkerpop/gremlin/driver/SettingsTest.java | 8 ++++-- .../server/GremlinDriverIntegrateTest.java | 27 +++++++++++++++++- 7 files changed, 74 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/650d1e84/CHANGELOG.asciidoc ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/650d1e84/docs/src/reference/gremlin-applications.asciidoc ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/650d1e84/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java ---------------------------------------------------------------------- diff --cc gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Cluster.java index cee1309,c090584..fe1d896 --- 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 @@@ -880,6 -900,28 +891,17 @@@ public final class Cluster } /** + * Specify a valid Gremlin script that can be used to test remote operations. This script should be designed + * to return quickly with the least amount of overhead possible. By default, the script sends an empty string. + * If the graph does not support that sort of script because it requires all scripts to include a reference + * to a graph then a good option might be {@code g.inject()}. + */ + public Builder validationRequest(final String script) { + validationRequest = script; + return this; + } + + /** - * Time in milliseconds to wait before attempting to reconnect to a dead host after it has been marked dead. - * - * @deprecated As of release 3.2.3, the value of the initial delay is now the same as the {@link #reconnectInterval}. - */ - @Deprecated - public Builder reconnectIntialDelay(final int initialDelay) { - this.reconnectInitialDelay = initialDelay; - return this; - } - - /** * Time in milliseconds to wait between retries when attempting to reconnect to a dead host. */ public Builder reconnectInterval(final int interval) { http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/650d1e84/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Settings.java ---------------------------------------------------------------------- diff --cc gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Settings.java index 37cecb4,c2ae045..61edd86 --- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Settings.java +++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Settings.java @@@ -409,6 -420,27 +411,11 @@@ final class Settings * {@link org.apache.tinkerpop.gremlin.driver.Channelizer.WebSocketChannelizer}. */ public String channelizer = Channelizer.WebSocketChannelizer.class.getName(); + + /** + * A valid Gremlin script that can be used to test remote operations. + */ + public String validationRequest = "''"; - - /** - * @deprecated as of 3.1.1-incubating, and not replaced as this property was never implemented internally - * as the way to establish sessions - */ - @Deprecated - public String sessionId = null; - - /** - * @deprecated as of 3.1.1-incubating, and not replaced as this property was never implemented internally - * as the way to establish sessions - */ - @Deprecated - public Optional optionalSessionId() { - return Optional.ofNullable(sessionId); - } } public static class SerializerSettings { http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/650d1e84/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/SettingsTest.java ---------------------------------------------------------------------- diff --cc gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/SettingsTest.java index 4ef0692,63c4308..c140f04 --- a/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/SettingsTest.java +++ b/gremlin-driver/src/test/java/org/apache/tinkerpop/gremlin/driver/SettingsTest.java @@@ -66,8 -68,10 +68,9 @@@ public class SettingsTest conf.setProperty("connectionPool.maxWaitForConnection", 700); conf.setProperty("connectionPool.maxContentLength", 800); conf.setProperty("connectionPool.reconnectInterval", 900); - conf.setProperty("connectionPool.reconnectInitialDelay", 1000); conf.setProperty("connectionPool.resultIterationBatchSize", 1100); conf.setProperty("connectionPool.channelizer", "channelizer0"); + conf.setProperty("connectionPool.validationRequest", "g.inject()"); final Settings settings = Settings.from(conf); @@@ -103,7 -107,9 +106,8 @@@ assertEquals(700, settings.connectionPool.maxWaitForConnection); assertEquals(800, settings.connectionPool.maxContentLength); assertEquals(900, settings.connectionPool.reconnectInterval); - assertEquals(1000, settings.connectionPool.reconnectInitialDelay); assertEquals(1100, settings.connectionPool.resultIterationBatchSize); assertEquals("channelizer0", settings.connectionPool.channelizer); + assertEquals("g.inject()", settings.connectionPool.validationRequest); } } http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/650d1e84/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java ----------------------------------------------------------------------