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 2017/07/10 20:26:52 UTC

tinkerpop git commit: removed deprecated ConfigurationTraversal. It was replaced by PureTraversal.

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1170 [created] b0de07fb1


removed deprecated ConfigurationTraversal. It was replaced by PureTraversal.


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

Branch: refs/heads/TINKERPOP-1170
Commit: b0de07fb12685cf8c71a090c10810f18f0a45026
Parents: 5554fea
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Jul 10 14:26:49 2017 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Jul 10 14:26:49 2017 -0600

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 docs/src/upgrade/release-3.3.x.asciidoc         |  4 +-
 .../computer/util/ConfigurationTraversal.java   | 73 --------------------
 3 files changed, 4 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b0de07fb/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 8c08d5d..3b1bb14 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.3.0 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Removed previously deprecated `ConfigurationTraversal`.
 * Established the Gryo 3.0 format.
 * `GryoVersion` now includes a default `ClassResolver` to supply to the `GryoMapper`.
 * `GryoClassResolver` renamed to `GryoClassResolverV1d0` which has an abstract class that for providers to extend in `AbstractGryoClassResolver`.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b0de07fb/docs/src/upgrade/release-3.3.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.3.x.asciidoc b/docs/src/upgrade/release-3.3.x.asciidoc
index e02bc6e..93e8c06 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -225,6 +225,7 @@ The following deprecated classes, methods or fields have been removed in this ve
 ** `org.apache.tinkerpop.gremlin.structure.io.Io.Builder#registry(IoRegistry)`
 ** `org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper.Builder#embedTypes(boolean)`
 ** `org.apache.tinkerpop.gremlin.structure.Transaction.submit(Function)`
+** `org.apache.tinkerpop.gremlin.process.computer.util.ConfigurationTraversal`
 * `gremlin-driver`
 ** `org.apache.tinkerpop.gremlin.driver.Cluster$Builder#reconnectIntialDelay(int)`
 ** `org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0(GryoMapper)`
@@ -309,7 +310,8 @@ link:https://issues.apache.org/jira/browse/TINKERPOP-1612[TINKERPOP-1612],
 link:https://issues.apache.org/jira/browse/TINKERPOP-1622[TINKERPOP-1622],
 link:https://issues.apache.org/jira/browse/TINKERPOP-1651[TINKERPOP-1651],
 link:https://issues.apache.org/jira/browse/TINKERPOP-1694[TINKERPOP-1694],
-link:https://issues.apache.org/jira/browse/TINKERPOP-1700[TINKERPOP-1700]
+link:https://issues.apache.org/jira/browse/TINKERPOP-1700[TINKERPOP-1700],
+link:https://issues.apache.org/jira/browse/TINKERPOP-1170[TINKERPOP-1170]
 
 Gremlin-server.sh and Init Scripts
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b0de07fb/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/util/ConfigurationTraversal.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/util/ConfigurationTraversal.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/util/ConfigurationTraversal.java
deleted file mode 100644
index 7142166..0000000
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/util/ConfigurationTraversal.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.process.computer.util;
-
-
-import org.apache.commons.configuration.Configuration;
-import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
-import org.apache.tinkerpop.gremlin.process.traversal.util.ScriptTraversal;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-
-import java.util.function.Function;
-import java.util.function.Supplier;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- * @deprecated As of release 3.2.0, replaced by {@link org.apache.tinkerpop.gremlin.process.traversal.util.PureTraversal}.
- */
-@Deprecated
-public final class ConfigurationTraversal<S, E> implements Supplier<Traversal.Admin<S, E>> {
-
-    private Function<Graph, Traversal.Admin<S, E>> traversalFunction;
-    private String configKey;
-    private Graph graph;
-
-    public Traversal.Admin<S, E> get() {
-        return this.traversalFunction.apply(this.graph);
-    }
-
-    private ConfigurationTraversal() {
-
-    }
-
-    public void storeState(final Configuration configuration) {
-        try {
-            VertexProgramHelper.serialize(this.traversalFunction, configuration, this.configKey);   // the traversal can not be serialized (probably because of lambdas). As such, try direct reference.
-        } catch (final IllegalArgumentException e) {
-            configuration.setProperty(this.configKey, this.traversalFunction);
-        }
-    }
-
-    public static <S, E> ConfigurationTraversal<S, E> storeState(final Function<Graph, Traversal.Admin<S, E>> traversalFunction, final Configuration configuration, final String configKey) {
-        final ConfigurationTraversal<S, E> configurationTraversal = new ConfigurationTraversal<>();
-        configurationTraversal.configKey = configKey;
-        configurationTraversal.traversalFunction = traversalFunction;
-        configurationTraversal.storeState(configuration);
-        return configurationTraversal;
-    }
-
-    public static <S, E> ConfigurationTraversal<S, E> loadState(final Graph graph, final Configuration configuration, final String configKey) {
-        final ConfigurationTraversal<S, E> configurationTraversal = new ConfigurationTraversal<>();
-        configurationTraversal.graph = graph;
-        configurationTraversal.configKey = configKey;
-        final Object configValue = configuration.getProperty(configKey);
-        configurationTraversal.traversalFunction = configValue instanceof String ? VertexProgramHelper.deserialize(configuration, configKey) : (Function<Graph, Traversal.Admin<S, E>>) configValue;
-        return configurationTraversal;
-    }
-}
\ No newline at end of file