Interface Traversal.Admin<S,E>
- 
- All Superinterfaces:
- AutoCloseable,- Cloneable,- Iterator<E>,- Serializable,- Traversal<S,E>
 - All Known Subinterfaces:
- CredentialTraversal<S,E>,- CredentialTraversalDsl<S,E>,- GraphTraversal.Admin<S,E>,- RemoteTraversal<S,E>
 - All Known Implementing Classes:
- AbstractLambdaTraversal,- AbstractRemoteTraversal,- ColumnTraversal,- ConstantTraversal,- DefaultCredentialTraversal,- DefaultGraphTraversal,- DefaultTraversal,- DriverRemoteTraversal,- EmbeddedRemoteTraversal,- EmptyTraversal,- HaltedTraversersCountTraversal,- IdentityTraversal,- LoopTraversal,- PredicateTraversal,- ScriptTraversal,- TokenTraversal,- TrueTraversal,- ValueTraversal
 
 public static interface Traversal.Admin<S,E> extends Traversal<S,E> 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.TraversalTraversal.Admin<S,E>, Traversal.Exceptions, Traversal.Symbols
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidaddStart(Traverser.Admin<S> start)Add a singleTraverser.Adminobject to the head of the traversal.default voidaddStarts(Iterator<Traverser.Admin<S>> starts)Add an iterator ofTraverser.Adminobjects to the head/start of the traversal.<S2,E2>
 Traversal.Admin<S2,E2>addStep(int index, Step<?,?> step)Add aStepto an arbitrary point in the traversal.default <E2> Traversal.Admin<S,E2>addStep(Step<?,E2> step)Add aStepto the end of the traversal.voidapplyStrategies()Apply the registeredTraversalStrategiesto the traversal.Traversal.Admin<S,E>clone()Cloning is used to duplicate the traversal typically in OLAP environments.default booleanequals(Traversal.Admin<S,E> other)BytecodegetBytecode()Get theBytecodeassociated with the construction of this traversal.default Step<?,E>getEndStep()Get the end/tail of the traversal.Optional<Graph>getGraph()TraversalParentgetParent()Get theTraversalParentStepthat is the parent of this traversal.TraversalSideEffectsgetSideEffects()Get theTraversalSideEffectsassociated with the traversal.default Step<S,?>getStartStep()Get the start/head of the traversal.List<Step>getSteps()Get theStepinstances associated with this traversal.TraversalStrategiesgetStrategies()Get theTraversalStrategiesassociated with this traversal.default Optional<TraversalSource>getTraversalSource()Gets theTraversalSourcethat spawned theTraversalinstance initially if present.TraverserGeneratorgetTraverserGenerator()Get theTraverserGeneratorassociated with this traversal.Set<TraverserRequirement>getTraverserRequirements()Get the set of allTraverserRequirements for this traversal.default Supplier<TraverserSet<S>>getTraverserSetSupplier()Gets a generator that creates newTraverserSetinstances for steps in the traversal.booleanisLocked()When the traversal has had itsTraversalStrategiesapplied to it, it is locked.default booleanisRoot()Determines if the traversal is at the root level.voidlock()Lock the traversal and perform any final adjustments to it after strategy application.default Traverser.Admin<E>nextTraverser()<S2,E2>
 Traversal.Admin<S2,E2>removeStep(int index)Remove aStepfrom the traversal.default <S2,E2>
 Traversal.Admin<S2,E2>removeStep(Step<?,?> step)Remove aStepfrom the traversal.default voidreset()Call theStep.reset()method on every step in the traversal.voidsetGraph(Graph graph)voidsetParent(TraversalParent step)Set theTraversalParentStepthat is the parent of this traversal.voidsetSideEffects(TraversalSideEffects sideEffects)Set theTraversalSideEffectsof this traversal.voidsetStrategies(TraversalStrategies strategies)Set theTraversalStrategiesto be used by this traversal at evaluation time.
 
- 
- 
- 
Method Detail- 
getBytecodeBytecode getBytecode() Get theBytecodeassociated with the construction of this traversal.- Returns:
- the byte code representation of the traversal
 
 - 
addStartsdefault void addStarts(Iterator<Traverser.Admin<S>> starts) Add an iterator ofTraverser.Adminobjects to the head/start of the traversal. Users should typically not need to call this method. For dynamic inject of data, they should useInjectStep.- Parameters:
- starts- an iterators of traversers
 
 - 
addStartdefault void addStart(Traverser.Admin<S> start) Add a singleTraverser.Adminobject to the head of the traversal. Users should typically not need to call this method. For dynamic inject of data, they should useInjectStep.- Parameters:
- start- a traverser to add to the traversal
 
 - 
getStepsList<Step> getSteps() Get theStepinstances associated with this traversal. The steps are ordered according to their linked list structure as defined byStep.getPreviousStep()andStep.getNextStep().- Returns:
- the ordered steps of the traversal
 
 - 
addStepdefault <E2> Traversal.Admin<S,E2> addStep(Step<?,E2> step) throws IllegalStateException Add aStepto the end of the traversal. This method should link the step to its next and previous step accordingly.- Type Parameters:
- E2- the output of the step
- Parameters:
- step- the step to add
- Returns:
- the updated traversal
- Throws:
- IllegalStateException- if the- TraversalStrategieshave already been applied
 
 - 
addStep<S2,E2> Traversal.Admin<S2,E2> addStep(int index, Step<?,?> step) throws IllegalStateException Add aStepto an arbitrary point in the traversal.- Type Parameters:
- 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)
- Parameters:
- index- the location in the traversal to insert the step
- step- the step to add
- Returns:
- the newly modulated traversal
- Throws:
- IllegalStateException- if the- TraversalStrategieshave already been applied
 
 - 
removeStepdefault <S2,E2> Traversal.Admin<S2,E2> removeStep(Step<?,?> step) throws IllegalStateException Remove aStepfrom the traversal.- Type Parameters:
- 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)
- Parameters:
- step- the step to remove
- Returns:
- the newly modulated traversal
- Throws:
- IllegalStateException- if the- TraversalStrategieshave already been applied
 
 - 
removeStep<S2,E2> Traversal.Admin<S2,E2> removeStep(int index) throws IllegalStateException Remove aStepfrom the traversal.- Type Parameters:
- 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)
- Parameters:
- index- the location in the traversal of the step to be evicted
- Returns:
- the newly modulated traversal
- Throws:
- IllegalStateException- if the- TraversalStrategieshave already been applied
 
 - 
getStartStepdefault Step<S,?> getStartStep() Get the start/head of the traversal. If the traversal is empty, then anEmptyStepinstance is returned.- Returns:
- the start step of the traversal
 
 - 
getEndStepdefault Step<?,E> getEndStep() Get the end/tail of the traversal. If the traversal is empty, then anEmptyStepinstance is returned.- Returns:
- the end step of the traversal
 
 - 
applyStrategiesvoid applyStrategies() throws IllegalStateExceptionApply the registeredTraversalStrategiesto 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 each strategy in turn to root traversal, then recursively to nested traversals.- Throws:
- IllegalStateException- if the- TraversalStrategieshave already been applied
 
 - 
getTraverserGeneratorTraverserGenerator getTraverserGenerator() Get theTraverserGeneratorassociated with this traversal. The traversal generator createsTraverserinstances that are respective of the traversal'sTraverserRequirement.- Returns:
- the generator of traversers
 
 - 
getTraverserSetSupplierdefault Supplier<TraverserSet<S>> getTraverserSetSupplier() Gets a generator that creates newTraverserSetinstances for steps in the traversal. Providers may override this default implementation to provider their ownTraverserSet.
 - 
getTraverserRequirementsSet<TraverserRequirement> getTraverserRequirements() Get the set of allTraverserRequirements for this traversal.- Returns:
- the features of a traverser that are required to execute properly in this traversal
 
 - 
resetdefault void reset() Call theStep.reset()method on every step in the traversal.
 - 
setSideEffectsvoid setSideEffects(TraversalSideEffects sideEffects) Set theTraversalSideEffectsof this traversal.- Parameters:
- sideEffects- the sideEffects to set for this traversal.
 
 - 
getSideEffectsTraversalSideEffects getSideEffects() Get theTraversalSideEffectsassociated with the traversal. This method should not be called externally for purposes of retrieving side-effects as traversal results. Traversal results should only be returned by way of the execution of the traversal itself. Should a side-effect of a traversal be needed it should only be obtained by usingGraphTraversal.cap(String, String...)so that the side-effect can be included as part of the traversal iteration. Relying on this method to get side-effects in these situations may not result in consistent behavior across all types of executions and environments (e.g. remoting).- Returns:
- The traversal sideEffects
 
 - 
setStrategiesvoid setStrategies(TraversalStrategies strategies) Set theTraversalStrategiesto be used by this traversal at evaluation time.- Parameters:
- strategies- the strategies to use on this traversal
 
 - 
getStrategiesTraversalStrategies getStrategies() Get theTraversalStrategiesassociated with this traversal.- Returns:
- the strategies associated with this traversal
 
 - 
setParentvoid setParent(TraversalParent step) Set theTraversalParentStepthat is the parent of this traversal. Traversals can be nested and this is the means by which the traversal tree is connected. If there is no parent, then it should be aEmptyStep.- Parameters:
- step- the traversal holder parent step or- EmptyStepif it has no parent
 
 - 
getParentTraversalParent getParent() Get theTraversalParentStepthat is the parent of this traversal. Traversals can be nested and this is the means by which the traversal tree is walked.- Returns:
- the traversal holder parent step or EmptyStepif it has no parent.
 
 - 
isRootdefault boolean isRoot() Determines if the traversal is at the root level.
 - 
cloneTraversal.Admin<S,E> clone() Cloning is used to duplicate the traversal typically in OLAP environments.- Returns:
- The cloned traversal
 
 - 
isLockedboolean isLocked() When the traversal has had itsTraversalStrategiesapplied to it, it is locked.- Returns:
- whether the traversal is locked
 
 - 
lockvoid lock() Lock the traversal and perform any final adjustments to it after strategy application.
 - 
getTraversalSourcedefault Optional<TraversalSource> getTraversalSource() Gets theTraversalSourcethat spawned theTraversalinstance initially if present. ThisTraversalSourceshould have spawned from the associatedGraphreturned fromgetGraph().
 - 
setGraphvoid setGraph(Graph graph) 
 - 
equalsdefault boolean equals(Traversal.Admin<S,E> other) 
 - 
nextTraverserdefault Traverser.Admin<E> nextTraverser() 
 
- 
 
-