public static interface Traversal.Admin<S,E> extends Traversal<S,E>
Traversal.Admin<S,E>, Traversal.Exceptions, Traversal.Symbols
Modifier and Type | Method and Description |
---|---|
default void |
addStart(Traverser.Admin<S> start)
Add a single
Traverser.Admin object to the head of the traversal. |
default void |
addStarts(Iterator<Traverser.Admin<S>> starts)
Add an iterator of
Traverser.Admin objects to the head/start of the traversal. |
<S2,E2> Traversal.Admin<S2,E2> |
addStep(int index,
Step<?,?> step)
Add a
Step to an arbitrary point in the traversal. |
default <E2> Traversal.Admin<S,E2> |
addStep(Step<?,E2> step)
Add a
Step to the end of the traversal. |
void |
applyStrategies()
Apply the registered
TraversalStrategies to the traversal. |
Traversal.Admin<S,E> |
clone()
Cloning is used to duplicate the traversal typically in OLAP environments.
|
default boolean |
equals(Traversal.Admin<S,E> other) |
Bytecode |
getBytecode()
Get the
Bytecode associated with the construction of this traversal. |
default Step<?,E> |
getEndStep()
Get the end/tail of the traversal.
|
Optional<Graph> |
getGraph()
|
org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent |
getParent()
Get the
TraversalParent Step that is the parent of this traversal. |
TraversalSideEffects |
getSideEffects()
Get the
TraversalSideEffects associated with the traversal. |
default Step<S,?> |
getStartStep()
Get the start/head of the traversal.
|
List<Step> |
getSteps()
Get the
Step instances associated with this traversal. |
TraversalStrategies |
getStrategies()
Get the
TraversalStrategies associated with this traversal. |
default Optional<TraversalSource> |
getTraversalSource()
Gets the
TraversalSource that spawned the Traversal instance initially if present. |
TraverserGenerator |
getTraverserGenerator()
Get the
TraverserGenerator associated with this traversal. |
Set<org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement> |
getTraverserRequirements()
Get the set of all
TraverserRequirement s for this traversal. |
boolean |
isLocked()
When the traversal has had its
TraversalStrategies applied to it, it is locked. |
default Traverser.Admin<E> |
nextTraverser() |
<S2,E2> Traversal.Admin<S2,E2> |
removeStep(int index)
Remove a
Step from the traversal. |
default <S2,E2> Traversal.Admin<S2,E2> |
removeStep(Step<?,?> step)
Remove a
Step from the traversal. |
default void |
reset()
Call the
Step.reset() method on every step in the traversal. |
void |
setGraph(Graph graph) |
void |
setParent(org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent step)
Set the
TraversalParent Step that is the parent of this traversal. |
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. |
Bytecode getBytecode()
Bytecode
associated with the construction of this traversal.default void addStarts(Iterator<Traverser.Admin<S>> starts)
Traverser.Admin
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.Admin<S> start)
Traverser.Admin
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 traversalList<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.Admin<S,E2> addStep(Step<?,E2> step) throws IllegalStateException
Step
to the end of the traversal. This method should link the step to its next and previous step accordingly.E2
- the output of the stepstep
- the step to addIllegalStateException
- if the TraversalStrategies
have already been applied<S2,E2> Traversal.Admin<S2,E2> addStep(int index, Step<?,?> step) throws IllegalStateException
Step
to an arbitrary point in the traversal.S2
- the new start type of the traversal (if the added step was a start step)E2
- the new end type of the traversal (if the added step was an end step)index
- the location in the traversal to insert the stepstep
- the step to addIllegalStateException
- if the TraversalStrategies
have already been applieddefault <S2,E2> Traversal.Admin<S2,E2> removeStep(Step<?,?> step) throws IllegalStateException
Step
from the traversal.S2
- the new start type of the traversal (if the removed step was a start step)E2
- the new end type of the traversal (if the removed step was an end step)step
- the step to removeIllegalStateException
- if the TraversalStrategies
have already been applied<S2,E2> Traversal.Admin<S2,E2> removeStep(int index) throws IllegalStateException
Step
from the traversal.S2
- the new start type of the traversal (if the removed step was a start step)E2
- the new end type of the traversal (if the removed step was an end step)index
- the location in the traversal of the step to be evictedIllegalStateException
- if the TraversalStrategies
have already been applieddefault Step<S,?> getStartStep()
EmptyStep
instance is returned.default Step<?,E> getEndStep()
EmptyStep
instance is returned.void applyStrategies() throws IllegalStateException
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.IllegalStateException
- if the TraversalStrategies
have already been appliedTraverserGenerator getTraverserGenerator()
TraverserGenerator
associated with this traversal.
The traversal generator creates Traverser
instances that are respective of the traversal's TraverserRequirement
.Set<org.apache.tinkerpop.gremlin.process.traversal.traverser.TraverserRequirement> getTraverserRequirements()
TraverserRequirement
s for this traversal.default void reset()
Step.reset()
method on every step in the traversal.void 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 setParent(org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent step)
TraversalParent
Step
that is the parent of this traversal.
Traversals can be nested and this is the means by which the traversal tree is connected.step
- the traversal holder parent steporg.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent getParent()
TraversalParent
Step
that is the parent of this traversal.
Traversals can be nested and this is the means by which the traversal tree is walked.Traversal.Admin<S,E> clone()
boolean isLocked()
TraversalStrategies
applied to it, it is locked.default Optional<TraversalSource> getTraversalSource()
TraversalSource
that spawned the Traversal
instance initially if present. This
TraversalSource
should have spawned from the associated Graph
returned from
getGraph()
.void setGraph(Graph graph)
default boolean equals(Traversal.Admin<S,E> other)
default Traverser.Admin<E> nextTraverser()
Copyright © 2013–2019 Apache Software Foundation. All rights reserved.