public class EmptyTraversal<S,E> extends java.lang.Object implements Traversal.Admin<S,E>
Traversal.Admin<S,E>, Traversal.Exceptions| Modifier | Constructor and Description |
|---|---|
protected |
EmptyTraversal() |
| Modifier and Type | Method and Description |
|---|---|
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) |
<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. |
Traversal.Admin<S,E> |
asAdmin()
Get access to administrative methods of the traversal via its accompanying
Traversal.Admin. |
EmptyTraversal<S,E> |
clone()
Cloning is used to duplicate the traversal typically in OLAP environments.
|
boolean |
equals(java.lang.Object object) |
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() |
TraverserGenerator |
getTraverserGenerator()
Get the
TraverserGenerator associated with this traversal. |
int |
hashCode() |
boolean |
hasNext() |
static <A,B> EmptyTraversal<A,B> |
instance() |
E |
next() |
<S2,E2> Traversal<S2,E2> |
removeStep(int index) |
void |
setSideEffects(TraversalSideEffects sideEffects)
Set the
TraversalSideEffects of this traversal. |
void |
setStrategies(TraversalStrategies traversalStrategies)
Set the
TraversalStrategies to be used by this traversal at evaluation time. |
void |
setTraversalHolder(TraversalHolder<?,?> step) |
Traversal<S,E> |
submit(GraphComputer computer)
Submit the traversal to a
GraphComputer for OLAP execution. |
finalize, getClass, notify, notifyAll, toString, wait, wait, waitremoveStep, reset, reversepublic static <A,B> EmptyTraversal<A,B> instance()
public Traversal.Admin<S,E> asAdmin()
TraversalTraversal.Admin.public boolean hasNext()
hasNext in interface java.util.Iterator<E>public TraversalSideEffects getSideEffects()
Traversal.AdminTraversalSideEffects associated with the traversal.getSideEffects in interface Traversal.Admin<S,E>public void applyStrategies(TraversalEngine engine)
Traversal.AdminTraversalStrategies 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.applyStrategies in interface Traversal.Admin<S,E>engine - the engine that will ultimately execute the traversal.public java.util.Optional<TraversalEngine> getTraversalEngine()
Traversal.AdminTraversalStrategies 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.getTraversalEngine in interface Traversal.Admin<S,E>public void addStarts(java.util.Iterator<Traverser<S>> starts)
Traversal.AdminTraverser 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.addStarts in interface Traversal.Admin<S,E>starts - an iterators of traverserspublic void addStart(Traverser<S> start)
Traversal.AdminTraverser 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.addStart in interface Traversal.Admin<S,E>start - a traverser to add to the traversalpublic <E2> Traversal<S,E2> addStep(Step<?,E2> step)
Traversal.AdminStep 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.addStep in interface Traversal.Admin<S,E>E2 - the output of the stepstep - the step to addpublic java.util.List<Step> getSteps()
Traversal.AdminStep instances associated with this traversal.
The steps are ordered according to their linked list structure as defined by Step.getPreviousStep() and Step.getNextStep().getSteps in interface Traversal.Admin<S,E>public Traversal<S,E> submit(GraphComputer computer)
TraversalGraphComputer for OLAP execution.
This method should apply the traversal strategies for TraversalEngine.COMPUTER.
Then register and execute the traversal via TraversalVertexProgram.
Then wrap the ComputerResult in a new Traversal containing a ComputerResultStep.public EmptyTraversal<S,E> clone() throws java.lang.CloneNotSupportedException
Traversalpublic TraverserGenerator getTraverserGenerator()
Traversal.AdminTraverserGenerator associated with this traversal.
The traversal generator creates Traverser instances that are respective of the traversal definition.getTraverserGenerator in interface Traversal.Admin<S,E>public void setSideEffects(TraversalSideEffects sideEffects)
Traversal.AdminTraversalSideEffects of this traversal.setSideEffects in interface Traversal.Admin<S,E>sideEffects - the sideEffects to set for this traversal.public TraversalStrategies getStrategies()
Traversal.AdminTraversalStrategies associated with this traversal.getStrategies in interface Traversal.Admin<S,E>public void setTraversalHolder(TraversalHolder<?,?> step)
setTraversalHolder in interface Traversal.Admin<S,E>public TraversalHolder<?,?> getTraversalHolder()
getTraversalHolder in interface Traversal.Admin<S,E>public void setStrategies(TraversalStrategies traversalStrategies)
Traversal.AdminTraversalStrategies to be used by this traversal at evaluation time.setStrategies in interface Traversal.Admin<S,E>traversalStrategies - the strategies to use on this traversalpublic <S2,E2> Traversal<S2,E2> addStep(int index, Step<?,?> step) throws java.lang.IllegalStateException
addStep in interface Traversal.Admin<S,E>java.lang.IllegalStateExceptionpublic <S2,E2> Traversal<S2,E2> removeStep(int index) throws java.lang.IllegalStateException
removeStep in interface Traversal.Admin<S,E>java.lang.IllegalStateExceptionpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2013-2015 TinkerPop. All Rights Reserved.