Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1143 [created] 38e74727f


TINKERPOP-1143 Moved TraversalEngine to gremlin-test

TraversalEngine and related infrastructure was deprecated way back on 3.2.0 but 
it was kept around because it was used in some infrastructure for testing. 
Graph providers should in no way still be using this interface and should have 
long ago gone to Computer as the gremlin-core infrastructure long ago quit 
using TraversalEngine in any capacity.


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

Branch: refs/heads/TINKERPOP-1143
Commit: 38e74727f3d9e3fc14c52bddf354a8936b1731b5
Parents: c14aa30
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Apr 4 17:32:04 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Apr 4 17:32:04 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |   1 +
 docs/src/upgrade/release-3.4.x.asciidoc         |  32 ++++
 .../process/traversal/TraversalEngine.java      | 106 ------------
 .../process/traversal/TraversalStrategies.java  |   4 +-
 .../engine/ComputerTraversalEngine.java         | 171 -------------------
 .../engine/StandardTraversalEngine.java         | 104 -----------
 .../process/traversal/step/map/MatchStep.java   |  20 +--
 .../tinkerpop/gremlin/structure/Graph.java      |   7 -
 .../traversal/step/map/MatchStepTest.java       |   7 +-
 .../process/traversal/TraversalEngine.java      |  34 ++++
 10 files changed, 81 insertions(+), 405 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/38e74727/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index fcc96b2..d632f10 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -28,6 +28,7 @@ This release also includes changes from <<release-3-3-2, 
3.3.2>>.
 * Change the `toString()` of `Path` to be standardized as other graph elements 
are.
 * Fixed a bug in `ReducingBarrierStep`, that returned the provided seed value 
despite no elements being available.
 * Changed the order of `select()` scopes. The order is now: maps, 
side-effects, paths.
+* Moved `TraversalEngine` to `gremlin-test` as it has long been only used in 
testing infrastructure.
 * Removed support for Giraph.
 
 == TinkerPop 3.3.0 (Gremlin Symphony #40 in G Minor)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/38e74727/docs/src/upgrade/release-3.4.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.4.x.asciidoc 
b/docs/src/upgrade/release-3.4.x.asciidoc
index 713916a..b055ead 100644
--- a/docs/src/upgrade/release-3.4.x.asciidoc
+++ b/docs/src/upgrade/release-3.4.x.asciidoc
@@ -37,6 +37,19 @@ needs.
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1930[TINKERPOP-1930]
 
+==== Deprecation Removal
+
+The following deprecated classes, methods or fields have been removed in this 
version:
+
+* `gremlin-core`
+** `org.apache.tinkerpop.gremlin.process.traversal.engine.*`
+** `org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine`
+
+Please see the javadoc deprecation notes or upgrade documentation specific to 
when the deprecation took place to
+understand how to resolve this breaking change.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1143[TINKERPOP-1143]
+
 ==== Modifications to reducing barrier steps
 
 The behavior of `min()`, `max()`, `mean()` and `sum()` has been modified to 
return no result if there's no input. Previously these steps yielded the 
internal seed value:
@@ -122,3 +135,22 @@ gremlin> g.V(1).
 ----
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1522[TINKERPOP-1522]
+
+=== Upgrading for Providers
+
+==== Graph Database Providers
+
+===== TraversalEngine Moved
+
+The `TraversalEngine` interface was deprecated in 3.2.0 along with all related 
methods that used it and classes that
+implemented it. It was replaced by the `Computer` interface and provided a 
much nicer way to plug different
+implementations of `Computer` into a traversal. `TraversalEngine` was never 
wholly removed however as it had some deep
+dependencies in the inner workings of the test suite. That infrastructure has 
largely remained as is until now.
+
+As of 3.4.0, `TraversalEngine` is no longer in `gremlin-core` and can instead 
be found in `gremlin-test` as it is
+effectively a "test-only" component and serves no other real function. As 
explained in the javadocs going back to
+3.2.0, providers should implement the `Computer` class and use that instead. 
At this point, graph providers should have
+long ago moved to the `Computer` infrastructure as methods for constructing a 
`TraversalSource` with a
+`TraversalEngine` were long ago removed.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1143[TINKERPOP-1143]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/38e74727/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalEngine.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalEngine.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalEngine.java
deleted file mode 100644
index 052b99b..0000000
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalEngine.java
+++ /dev/null
@@ -1,106 +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.traversal;
-
-import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.List;
-import java.util.Optional;
-
-/**
- * A TraversalEngine is reponsible for executing a {@link Traversal}. There 
are two {@link Type}s of TraversalEngines.
- * {@link Type#STANDARD} is the OLTP, iterator-based model of graph traversal.
- * {@link Type#COMPUTER} is the OLAP, message passing model of graph traversal.
- * Every {@link TraversalSource} should be provided a {@link 
TraversalEngine.Builder} so it can construct an engine for each spawned {@link 
Traversal}.
- *
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- * @deprecated As of release 3.2.0, replaced by {@code Computer}.
- */
-@Deprecated
-public interface TraversalEngine extends Serializable {
-
-    public enum Type {STANDARD, COMPUTER}
-
-    /**
-     * Get the type of the engine: {@link Type#STANDARD} or {@link 
Type#COMPUTER}.
-     *
-     * @return the traversal engine type
-     */
-    public Type getType();
-
-    /**
-     * If the traversal engine is of type {@link Type#COMPUTER}, then it 
should have the {@link GraphComputer} used for executing the traversal.
-     *
-     * @return an optional of containing the graph computer to be used for 
execution.
-     */
-    public Optional<GraphComputer> getGraphComputer();
-
-    /**
-     * Whether or not the type is {@link Type#STANDARD}.
-     *
-     * @return whether the engine type is standard (OLTP).
-     */
-    public default boolean isStandard() {
-        return this.getType().equals(Type.STANDARD);
-    }
-
-    /**
-     * Whether or not the type is {@link Type#COMPUTER}.
-     *
-     * @return whether the engine type is computer (OLAP).
-     */
-    public default boolean isComputer() {
-        return this.getType().equals(Type.COMPUTER);
-    }
-
-    ///////////
-
-    @Deprecated
-    public interface Builder extends Serializable {
-
-        /**
-         * A list of {@link TraversalStrategy} instances that should be 
applied to the ultimate {@link Traversal}.
-         *
-         * @return strategies to apply (if any).
-         */
-        public default List<TraversalStrategy> getWithStrategies() {
-            return Collections.emptyList();
-        }
-
-        /**
-         * A list of {@link TraversalStrategy} classes that should not be 
applied to the ultimate {@link Traversal}.
-         *
-         * @return strategies to not apply (if any).
-         */
-        public default List<Class<? extends TraversalStrategy>> 
getWithoutStrategies() {
-            return Collections.emptyList();
-        }
-
-        /**
-         * Create the {@link TraversalEngine}.
-         *
-         * @param graph the graph to ultimately have the {@link Traversal} 
execute over.
-         * @return a {@link TraversalEngine} that is particular to a {@link 
Traversal}.
-         */
-        public TraversalEngine create(final Graph graph);
-    }
-}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/38e74727/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
index 853229d..07643c4 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalStrategies.java
@@ -82,8 +82,8 @@ public interface TraversalStrategies extends Serializable, 
Cloneable {
     }
 
     /**
-     * Apply all the {@link TraversalStrategy} optimizers to the {@link 
Traversal} for the stated {@link TraversalEngine}.
-     * This method must ensure that the strategies are sorted prior to 
application.
+     * Apply all the {@link TraversalStrategy} optimizers to the {@link 
Traversal}. This method must ensure that the
+     * strategies are sorted prior to application.
      *
      * @param traversal the traversal to apply the strategies to
      */

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/38e74727/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/engine/ComputerTraversalEngine.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/engine/ComputerTraversalEngine.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/engine/ComputerTraversalEngine.java
deleted file mode 100644
index 3786280..0000000
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/engine/ComputerTraversalEngine.java
+++ /dev/null
@@ -1,171 +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.traversal.engine;
-
-import org.apache.tinkerpop.gremlin.process.computer.Computer;
-import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
-import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategy;
-import 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import org.apache.tinkerpop.gremlin.structure.Edge;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Optional;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- * @deprecated As of release 3.2.0. Please use {@link Graph#traversal(Class)}.
- */
-@Deprecated
-public final class ComputerTraversalEngine implements TraversalEngine {
-
-    private final transient GraphComputer graphComputer;
-
-    private ComputerTraversalEngine(final GraphComputer graphComputer) {
-        this.graphComputer = graphComputer;
-    }
-
-    /**
-     * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-     */
-    @Deprecated
-    @Override
-    public Type getType() {
-        return Type.COMPUTER;
-    }
-
-    /**
-     * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-     */
-    @Deprecated
-    @Override
-    public String toString() {
-        return this.getClass().getSimpleName().toLowerCase();
-    }
-
-    /**
-     * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-     */
-    @Deprecated
-    @Override
-    public Optional<GraphComputer> getGraphComputer() {
-        return Optional.ofNullable(this.graphComputer);
-    }
-
-    /**
-     * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-     */
-    @Deprecated
-    public static Builder build() {
-        return new Builder();
-    }
-
-    /**
-     * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-     */
-    @Deprecated
-    public final static class Builder implements TraversalEngine.Builder {
-
-        private Class<? extends GraphComputer> graphComputerClass;
-        private int workers = -1;
-        private Traversal<Vertex, Vertex> vertexFilter = null;
-        private Traversal<Vertex, Edge> edgeFilter = null;
-
-        /**
-         * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-         */
-        @Deprecated
-        @Override
-        public List<TraversalStrategy> getWithStrategies() {
-            return Collections.emptyList();
-        }
-
-        /**
-         * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-         */
-        @Deprecated
-        public Builder workers(final int workers) {
-            this.workers = workers;
-            return this;
-        }
-
-        /**
-         * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-         */
-        @Deprecated
-        public Builder computer(final Class<? extends GraphComputer> 
graphComputerClass) {
-            this.graphComputerClass = graphComputerClass;
-            return this;
-        }
-
-        /**
-         * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-         */
-        @Deprecated
-        public Builder vertices(final Traversal<Vertex, Vertex> vertexFilter) {
-            this.vertexFilter = vertexFilter;
-            return this;
-        }
-
-        /**
-         * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-         */
-        @Deprecated
-        public Builder edges(final Traversal<Vertex, Edge> edgeFilter) {
-            this.edgeFilter = edgeFilter;
-            return this;
-        }
-
-
-        /**
-         * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-         */
-        @Deprecated
-        public ComputerTraversalEngine create(final Graph graph) {
-            GraphComputer graphComputer = null == this.graphComputerClass ? 
graph.compute() : graph.compute(this.graphComputerClass);
-            if (-1 != this.workers)
-                graphComputer = graphComputer.workers(this.workers);
-            if (null != this.vertexFilter)
-                graphComputer = graphComputer.vertices(this.vertexFilter);
-            if (null != this.edgeFilter)
-                graphComputer = graphComputer.edges(this.edgeFilter);
-            return new ComputerTraversalEngine(graphComputer);
-        }
-
-        /**
-         * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-         */
-        @Deprecated
-        public TraversalSource create(final GraphTraversalSource 
traversalSource) {
-            Computer computer = null == this.graphComputerClass ? 
Computer.compute() : Computer.compute(this.graphComputerClass);
-            if (-1 != this.workers)
-                computer = computer.workers(this.workers);
-            if (null != this.vertexFilter)
-                computer = computer.vertices(this.vertexFilter);
-            if (null != this.edgeFilter)
-                computer = computer.edges(this.edgeFilter);
-            return traversalSource.withComputer(computer);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/38e74727/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/engine/StandardTraversalEngine.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/engine/StandardTraversalEngine.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/engine/StandardTraversalEngine.java
deleted file mode 100644
index 1dbd8e7..0000000
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/engine/StandardTraversalEngine.java
+++ /dev/null
@@ -1,104 +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.traversal.engine;
-
-import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-
-import java.util.Optional;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- * @deprecated As of release 3.2.0. Please use {@link Graph#traversal(Class)}.
- */
-@Deprecated
-public final class StandardTraversalEngine implements TraversalEngine {
-
-    private static final StandardTraversalEngine INSTANCE = new 
StandardTraversalEngine();
-
-    /**
-     * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-     */
-    @Deprecated
-    private StandardTraversalEngine() {
-
-    }
-
-    /**
-     * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-     */
-    @Deprecated
-    @Override
-    public Type getType() {
-        return Type.STANDARD;
-    }
-
-    /**
-     * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-     */
-    @Deprecated
-    @Override
-    public Optional<GraphComputer> getGraphComputer() {
-        return Optional.empty();
-    }
-
-    /**
-     * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-     */
-    @Deprecated
-    public static Builder build() {
-        return Builder.INSTANCE;
-    }
-
-    /**
-     * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-     */
-    @Deprecated
-    public static StandardTraversalEngine instance() {
-        return INSTANCE;
-    }
-
-    /**
-     * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-     */
-    @Deprecated
-    @Override
-    public String toString() {
-        return this.getClass().getSimpleName().toLowerCase();
-    }
-
-    /**
-     * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-     */
-    @Deprecated
-    public final static class Builder implements TraversalEngine.Builder {
-
-        private static final Builder INSTANCE = new Builder();
-
-        /**
-         * @deprecated As of release 3.2.0. Please use {@link 
Graph#traversal(Class)}.
-         */
-        @Deprecated
-        @Override
-        public TraversalEngine create(final Graph graph) {
-            return StandardTraversalEngine.INSTANCE;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/38e74727/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
index 8e2207a..ec3795d 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStep.java
@@ -20,10 +20,8 @@ package 
org.apache.tinkerpop.gremlin.process.traversal.step.map;
 
 import org.apache.tinkerpop.gremlin.process.traversal.Path;
 import org.apache.tinkerpop.gremlin.process.traversal.Pop;
-import org.apache.tinkerpop.gremlin.process.traversal.Scope;
 import org.apache.tinkerpop.gremlin.process.traversal.Step;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.step.Barrier;
 import org.apache.tinkerpop.gremlin.process.traversal.step.PathProcessor;
@@ -236,7 +234,7 @@ public final class MatchStep<S, E> extends 
ComputerAwareStep<S, Map<String, E>>
 
     public MatchAlgorithm getMatchAlgorithm() {
         if (null == this.matchAlgorithm)
-            
this.initializeMatchAlgorithm(this.traverserStepIdAndLabelsSetByChild ? 
TraversalEngine.Type.COMPUTER : TraversalEngine.Type.STANDARD);
+            
this.initializeMatchAlgorithm(this.traverserStepIdAndLabelsSetByChild);
         return this.matchAlgorithm;
     }
 
@@ -324,13 +322,13 @@ public final class MatchStep<S, E> extends 
ComputerAwareStep<S, Map<String, E>>
         return bindings;
     }
 
-    private void initializeMatchAlgorithm(final TraversalEngine.Type 
traversalEngineType) {
+    private void initializeMatchAlgorithm(final boolean onComputer) {
         try {
             this.matchAlgorithm = 
this.matchAlgorithmClass.getConstructor().newInstance();
         } catch (final NoSuchMethodException | IllegalAccessException | 
InvocationTargetException | InstantiationException e) {
             throw new IllegalStateException(e.getMessage(), e);
         }
-        this.matchAlgorithm.initialize(traversalEngineType, 
this.matchTraversals);
+        this.matchAlgorithm.initialize(onComputer, this.matchTraversals);
     }
 
     private boolean hasPathLabel(final Path path, final Set<String> labels) {
@@ -362,7 +360,7 @@ public final class MatchStep<S, E> extends 
ComputerAwareStep<S, Map<String, E>>
         while (true) {
             if (this.first) {
                 this.first = false;
-                this.initializeMatchAlgorithm(TraversalEngine.Type.STANDARD);
+                this.initializeMatchAlgorithm(true);
                 if (null != this.keepLabels &&
                         this.keepLabels.containsAll(this.matchEndLabels) &&
                         this.keepLabels.containsAll(this.matchStartLabels))
@@ -416,7 +414,7 @@ public final class MatchStep<S, E> extends 
ComputerAwareStep<S, Map<String, E>>
         while (true) {
             if (this.first) {
                 this.first = false;
-                this.initializeMatchAlgorithm(TraversalEngine.Type.COMPUTER);
+                this.initializeMatchAlgorithm(true);
                 if (null != this.keepLabels &&
                         this.keepLabels.containsAll(this.matchEndLabels) &&
                         this.keepLabels.containsAll(this.matchStartLabels))
@@ -692,7 +690,7 @@ public final class MatchStep<S, E> extends 
ComputerAwareStep<S, Map<String, E>>
         public static Function<List<Traversal.Admin<Object, Object>>, 
IllegalStateException> UNMATCHABLE_PATTERN = traversals -> new 
IllegalStateException("The provided match pattern is unsolvable: " + 
traversals);
 
 
-        public void initialize(final TraversalEngine.Type traversalEngineType, 
final List<Traversal.Admin<Object, Object>> traversals);
+        public void initialize(final boolean onComputer, final 
List<Traversal.Admin<Object, Object>> traversals);
 
         public default void recordStart(final Traverser.Admin<Object> 
traverser, final Traversal.Admin<Object, Object> traversal) {
 
@@ -708,7 +706,7 @@ public final class MatchStep<S, E> extends 
ComputerAwareStep<S, Map<String, E>>
         private List<Traversal.Admin<Object, Object>> traversals;
 
         @Override
-        public void initialize(final TraversalEngine.Type traversalEngineType, 
final List<Traversal.Admin<Object, Object>> traversals) {
+        public void initialize(final boolean onComputer, final 
List<Traversal.Admin<Object, Object>> traversals) {
             this.traversals = traversals;
         }
 
@@ -728,8 +726,8 @@ public final class MatchStep<S, E> extends 
ComputerAwareStep<S, Map<String, E>>
         protected int counter = 0;
         protected boolean onComputer;
 
-        public void initialize(final TraversalEngine.Type traversalEngineType, 
final List<Traversal.Admin<Object, Object>> traversals) {
-            this.onComputer = 
traversalEngineType.equals(TraversalEngine.Type.COMPUTER);
+        public void initialize(final boolean onComputer, final 
List<Traversal.Admin<Object, Object>> traversals) {
+            this.onComputer = onComputer;
             this.bundles = 
traversals.stream().map(Bundle::new).collect(Collectors.toList());
         }
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/38e74727/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
index 5dec1a5..b1d3f27 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
@@ -21,10 +21,8 @@ package org.apache.tinkerpop.gremlin.structure;
 import org.apache.commons.configuration.Configuration;
 import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource;
 import 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import 
org.apache.tinkerpop.gremlin.process.traversal.engine.ComputerTraversalEngine;
 import org.apache.tinkerpop.gremlin.structure.io.Io;
 import org.apache.tinkerpop.gremlin.structure.io.IoRegistry;
 import org.apache.tinkerpop.gremlin.structure.util.FeatureDescriptor;
@@ -1120,11 +1118,6 @@ public interface Graph extends AutoCloseable, Host {
             return new UnsupportedOperationException("Graph does not support 
graph computer");
         }
 
-        @Deprecated
-        public static IllegalArgumentException 
traversalEngineNotSupported(final TraversalEngine engine) {
-            return new IllegalArgumentException("Graph does not support the 
provided traversal engine: " + engine.getClass().getCanonicalName());
-        }
-
         public static IllegalArgumentException 
graphDoesNotSupportProvidedGraphComputer(final Class graphComputerClass) {
             return new IllegalArgumentException("Graph does not support the 
provided graph computer: " + graphComputerClass.getSimpleName());
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/38e74727/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStepTest.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStepTest.java
 
b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStepTest.java
index 9061258..9b204cf 100644
--- 
a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStepTest.java
+++ 
b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchStepTest.java
@@ -20,7 +20,6 @@ package 
org.apache.tinkerpop.gremlin.process.traversal.step.map;
 
 import org.apache.tinkerpop.gremlin.process.traversal.P;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
 import org.apache.tinkerpop.gremlin.process.traversal.Traverser;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
 import org.apache.tinkerpop.gremlin.process.traversal.step.StepTest;
@@ -200,7 +199,7 @@ public class MatchStepTest extends StepTest {
         // MAKE SURE THE SORT ORDER CHANGES AS MORE RESULTS ARE RETURNED BY 
ONE OR THE OTHER TRAVERSAL
         Traversal.Admin<?, ?> traversal = __.match(as("a").out().as("b"), 
as("c").in().as("d")).asAdmin();
         MatchStep.CountMatchAlgorithm countMatchAlgorithm = new 
MatchStep.CountMatchAlgorithm();
-        countMatchAlgorithm.initialize(TraversalEngine.Type.STANDARD, 
((MatchStep<?, ?>) traversal.getStartStep()).getGlobalChildren());
+        countMatchAlgorithm.initialize(false, ((MatchStep<?, ?>) 
traversal.getStartStep()).getGlobalChildren());
         Traversal.Admin<Object, Object> firstPattern = ((MatchStep<?, ?>) 
traversal.getStartStep()).getGlobalChildren().get(0);
         Traversal.Admin<Object, Object> secondPattern = ((MatchStep<?, ?>) 
traversal.getStartStep()).getGlobalChildren().get(1);
         //
@@ -246,7 +245,7 @@ public class MatchStepTest extends StepTest {
         ///////  MAKE SURE WHERE PREDICATE TRAVERSALS ARE ALWAYS FIRST AS THEY 
ARE SIMPLY .hasNext() CHECKS
         traversal = __.match(as("a").out().as("b"), as("c").in().as("d"), 
where("a", P.eq("b"))).asAdmin();
         countMatchAlgorithm = new MatchStep.CountMatchAlgorithm();
-        countMatchAlgorithm.initialize(TraversalEngine.Type.STANDARD, 
((MatchStep<?, ?>) traversal.getStartStep()).getGlobalChildren());
+        countMatchAlgorithm.initialize(false, ((MatchStep<?, ?>) 
traversal.getStartStep()).getGlobalChildren());
         assertEquals(3, countMatchAlgorithm.bundles.size());
         firstPattern = ((MatchStep<?, ?>) 
traversal.getStartStep()).getGlobalChildren().get(0);
         secondPattern = ((MatchStep<?, ?>) 
traversal.getStartStep()).getGlobalChildren().get(1);
@@ -334,7 +333,7 @@ public class MatchStepTest extends StepTest {
                 .asAdmin();
         traversal.applyStrategies(); // necessary to enure step ids are unique
         final MatchStep.CountMatchAlgorithm countMatchAlgorithm = new 
MatchStep.CountMatchAlgorithm();
-        countMatchAlgorithm.initialize(TraversalEngine.Type.COMPUTER, 
((MatchStep<?, ?>) traversal.getStartStep()).getGlobalChildren());
+        countMatchAlgorithm.initialize(true, ((MatchStep<?, ?>) 
traversal.getStartStep()).getGlobalChildren());
         Traversal.Admin<Object, Object> firstPattern = ((MatchStep<?, ?>) 
traversal.getStartStep()).getGlobalChildren().get(0);
         Traversal.Admin<Object, Object> secondPattern = ((MatchStep<?, ?>) 
traversal.getStartStep()).getGlobalChildren().get(1);
         Traversal.Admin<Object, Object> thirdPattern = ((MatchStep<?, ?>) 
traversal.getStartStep()).getGlobalChildren().get(2);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/38e74727/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalEngine.java
----------------------------------------------------------------------
diff --git 
a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalEngine.java
 
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalEngine.java
new file mode 100644
index 0000000..e972cdf
--- /dev/null
+++ 
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/TraversalEngine.java
@@ -0,0 +1,34 @@
+/*
+ * 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.traversal;
+
+import org.apache.tinkerpop.gremlin.process.computer.Computer;
+
+/**
+ * A TraversalEngine is a test component that helps determine the engine on 
which a traversal test will execute. This
+ * interface was originally in {@code gremlin-core} but deprecated in favor of 
{@link Computer}. Since this interface
+ * was heavily bound to the test suite it was maintained until 3.4.0 when it 
was finally moved here to
+ * {@code gremlin-test} where it simply serves as testing infrastructure to 
provide hints on whether a test will be
+ * executed with a {@link Computer} or not.
+ *
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ */
+public interface TraversalEngine {
+    public enum Type {STANDARD, COMPUTER}
+}

Reply via email to