Return-Path: X-Original-To: apmail-tinkerpop-commits-archive@minotaur.apache.org Delivered-To: apmail-tinkerpop-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8A37818DD6 for ; Thu, 3 Dec 2015 16:43:24 +0000 (UTC) Received: (qmail 75505 invoked by uid 500); 3 Dec 2015 16:43:24 -0000 Delivered-To: apmail-tinkerpop-commits-archive@tinkerpop.apache.org Received: (qmail 75478 invoked by uid 500); 3 Dec 2015 16:43:24 -0000 Mailing-List: contact commits-help@tinkerpop.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tinkerpop.incubator.apache.org Delivered-To: mailing list commits@tinkerpop.incubator.apache.org Received: (qmail 75469 invoked by uid 99); 3 Dec 2015 16:43:24 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2015 16:43:24 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id E7D5BC5525 for ; Thu, 3 Dec 2015 16:43:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.247 X-Spam-Level: * X-Spam-Status: No, score=1.247 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.554, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id ZqE4uOdnY7WF for ; Thu, 3 Dec 2015 16:43:09 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 06F86334E1 for ; Thu, 3 Dec 2015 16:42:58 +0000 (UTC) Received: (qmail 70851 invoked by uid 99); 3 Dec 2015 16:42:57 -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; Thu, 03 Dec 2015 16:42:57 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 6C54EE6819; Thu, 3 Dec 2015 16:42:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: okram@apache.org To: commits@tinkerpop.incubator.apache.org Date: Thu, 03 Dec 2015 16:43:06 -0000 Message-Id: <55c67d0cbe604be08b681c85a2d5e538@git.apache.org> In-Reply-To: <7ddfc1cac2064448b504bfb82908f6f4@git.apache.org> References: <7ddfc1cac2064448b504bfb82908f6f4@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [10/50] incubator-tinkerpop git commit: Get rid of more internal "rebound" naming. Get rid of more internal "rebound" naming. The naming of "rebound" was deprecated for 3.1.0 so this deprecation was due. Not a breaking changes as the new Alias client extends ReboundClient - should work as a compile timer replacement. Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/12e1250a Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/12e1250a Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/12e1250a Branch: refs/heads/TINKERPOP3-982 Commit: 12e1250a55df841fbcd8aa37d1da998a17cd7fff Parents: 5cb5911 Author: Stephen Mallette Authored: Thu Nov 26 11:04:48 2015 -0500 Committer: Stephen Mallette Committed: Thu Nov 26 11:04:48 2015 -0500 ---------------------------------------------------------------------- .../apache/tinkerpop/gremlin/driver/Client.java | 35 +++++++++++++++----- 1 file changed, 26 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/12e1250a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java ---------------------------------------------------------------------- diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java index a2308f0..d8a6eca 100644 --- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java +++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java @@ -310,7 +310,7 @@ public abstract class Client { */ @Override public Client alias(String graphOrTraversalSource) { - return new ReboundClusteredClient(this, graphOrTraversalSource); + return new AliasClusteredClient(this, graphOrTraversalSource); } /** @@ -329,7 +329,7 @@ public abstract class Client { * the created {@code Client}. */ public Client alias(final Map aliases) { - return new ReboundClusteredClient(this, aliases); + return new AliasClusteredClient(this, aliases); } /** @@ -386,21 +386,38 @@ public abstract class Client { * Uses a {@link org.apache.tinkerpop.gremlin.driver.Client.ClusteredClient} that rebinds requests to a * specified {@link Graph} or {@link TraversalSource} instances on the server-side. */ - public final static class ReboundClusteredClient extends Client { + public final static class AliasClusteredClient extends ReboundClusteredClient { + public AliasClusteredClient(ClusteredClient clusteredClient, String graphOrTraversalSource) { + super(clusteredClient, graphOrTraversalSource); + } + + public AliasClusteredClient(ClusteredClient clusteredClient, Map rebindings) { + super(clusteredClient, rebindings); + } + } + + /** + * Uses a {@link org.apache.tinkerpop.gremlin.driver.Client.ClusteredClient} that rebinds requests to a + * specified {@link Graph} or {@link TraversalSource} instances on the server-side. + * + * @deprecated As of release 3.1.1-incubating, replaced by {@link AliasClusteredClient}. + */ + @Deprecated + public static class ReboundClusteredClient extends Client { private final ClusteredClient clusteredClient; - private final Map rebindings = new HashMap<>(); + private final Map aliases = new HashMap<>(); final CompletableFuture close = new CompletableFuture<>(); ReboundClusteredClient(final ClusteredClient clusteredClient, final String graphOrTraversalSource) { super(clusteredClient.cluster); this.clusteredClient = clusteredClient; - rebindings.put("g", graphOrTraversalSource); + aliases.put("g", graphOrTraversalSource); } ReboundClusteredClient(final ClusteredClient clusteredClient, final Map rebindings) { super(clusteredClient.cluster); this.clusteredClient = clusteredClient; - this.rebindings.putAll(rebindings); + this.aliases.putAll(rebindings); } @Override @@ -416,8 +433,8 @@ public abstract class Client { @Override public RequestMessage buildMessage(final RequestMessage.Builder builder) { if (close.isDone()) throw new IllegalStateException("Client is closed"); - if (!rebindings.isEmpty()) - builder.addArg(Tokens.ARGS_ALIASES, rebindings); + if (!aliases.isEmpty()) + builder.addArg(Tokens.ARGS_ALIASES, aliases); return builder.create(); } @@ -462,7 +479,7 @@ public abstract class Client { @Override public Client alias(String graphOrTraversalSource) { if (close.isDone()) throw new IllegalStateException("Client is closed"); - return new ReboundClusteredClient(clusteredClient, graphOrTraversalSource); + return new AliasClusteredClient(clusteredClient, graphOrTraversalSource); } }