public static interface Traversal.Admin<S,E> extends Traversal<S,E>
Traversal.Admin<S,E>, Traversal.Exceptions| Modifier and Type | Method and Description |
|---|---|
default void |
addStart(Traverser<S> start)
Add a single
Traverser object to the head of the traversal. |
void |
addStarts(java.util.Iterator<Traverser<S>> starts)
Add an iterator of
Traverser objects to the head/start of the traversal. |
<S2,E2> Traversal<S2,E2> |
addStep(int index,
Step<?,?> step) |
default <E2> Traversal<S,E2> |
addStep(Step<?,E2> step)
Add a
Step to the end of the traversal. |
void |
applyStrategies(TraversalEngine engine)
Apply the registered
TraversalStrategies to the traversal. |
TraversalSideEffects |
getSideEffects()
Get the
TraversalSideEffects associated with the traversal. |
java.util.List<Step> |
getSteps()
Get the
Step instances associated with this traversal. |
TraversalStrategies |
getStrategies()
Get the
TraversalStrategies associated with this traversal. |
java.util.Optional<TraversalEngine> |
getTraversalEngine()
When the
TraversalStrategies have been applied, the destined TraversalEngine has been declared. |
TraversalHolder<?,?> |
getTraversalHolder() |
default TraverserGenerator |
getTraverserGenerator()
Get the
TraverserGenerator associated with this traversal. |
<S2,E2> Traversal<S2,E2> |
removeStep(int index) |
default <S2,E2> Traversal<S2,E2> |
removeStep(Step<?,?> step) |
default void |
reset()
Call the
Step.reset() method on every step in the traversal. |
default Traversal<S,E> |
reverse()
|
void |
setSideEffects(TraversalSideEffects sideEffects)
Set the
TraversalSideEffects of this traversal. |
void |
setStrategies(TraversalStrategies strategies)
Set the
TraversalStrategies to be used by this traversal at evaluation time. |
void |
setTraversalHolder(TraversalHolder<?,?> step) |
void addStarts(java.util.Iterator<Traverser<S>> starts)
Traverser objects to the head/start of the traversal.
Users should typically not need to call this method. For dynamic inject of data, they should use InjectStep.starts - an iterators of traversersdefault void addStart(Traverser<S> start)
Traverser object to the head of the traversal.
Users should typically not need to call this method. For dynamic inject of data, they should use InjectStep.start - a traverser to add to the traversaljava.util.List<Step> getSteps()
Step instances associated with this traversal.
The steps are ordered according to their linked list structure as defined by Step.getPreviousStep() and Step.getNextStep().default <E2> Traversal<S,E2> addStep(Step<?,E2> step) throws java.lang.IllegalStateException
Step to the end of the traversal. This method should automatically re-link the step accordingly (see TraversalHelper.reLinkSteps(com.tinkerpop.gremlin.process.Traversal.Admin<?, ?>)).
If the TraversalStrategies have already been applied, then an IllegalStateException is throw stating the traversal is locked.E2 - the output of the stepstep - the step to addjava.lang.IllegalStateException<S2,E2> Traversal<S2,E2> addStep(int index, Step<?,?> step) throws java.lang.IllegalStateException
java.lang.IllegalStateExceptiondefault <S2,E2> Traversal<S2,E2> removeStep(Step<?,?> step) throws java.lang.IllegalStateException
java.lang.IllegalStateException<S2,E2> Traversal<S2,E2> removeStep(int index) throws java.lang.IllegalStateException
java.lang.IllegalStateExceptionvoid applyStrategies(TraversalEngine engine)
TraversalStrategies to the traversal.
Once the strategies are applied, the traversal is "locked" and can no longer have steps added to it.
The order of operations for strategy applications should be: globally id steps, apply strategies to root traversal, then to nested traversals.engine - the engine that will ultimately execute the traversal.java.util.Optional<TraversalEngine> getTraversalEngine()
TraversalStrategies have been applied, the destined TraversalEngine has been declared.
Once a traversal engine has been declared, the traversal can no longer be extended, only executed.default TraverserGenerator getTraverserGenerator()
TraverserGenerator associated with this traversal.
The traversal generator creates Traverser instances that are respective of the traversal definition.default void reset()
Step.reset() method on every step in the traversal.default Traversal<S,E> reverse() throws java.lang.IllegalStateException
java.lang.IllegalStateExceptionvoid setSideEffects(TraversalSideEffects sideEffects)
TraversalSideEffects of this traversal.sideEffects - the sideEffects to set for this traversal.TraversalSideEffects getSideEffects()
TraversalSideEffects associated with the traversal.void setStrategies(TraversalStrategies strategies)
TraversalStrategies to be used by this traversal at evaluation time.strategies - the strategies to use on this traversalTraversalStrategies getStrategies()
TraversalStrategies associated with this traversal.void setTraversalHolder(TraversalHolder<?,?> step)
TraversalHolder<?,?> getTraversalHolder()
Copyright © 2013-2015 TinkerPop. All Rights Reserved.