public static interface Traverser.Admin<T> extends Traverser<T>, Attachable<Traverser.Admin<T>>
Traverser.Admin<T>
Modifier and Type | Method and Description |
---|---|
default Traverser.Admin<T> |
attach(Graph graph)
Traversers can not attach to graphs and thus, an
UnsupportedOperationException is thrown. |
Traverser.Admin<T> |
attach(Vertex hostVertex)
Regenerate the detached traverser given its location at a particular vertex.
|
Traverser.Admin<T> |
detach()
Prepare the traverser for migration across a JVM boundary.
|
TraversalSideEffects |
getSideEffects()
Get the sideEffects associated with the traversal of the traverser.
|
String |
getStepId()
Get the step id of where the traverser is located.
|
void |
incrLoops(String stepLabel)
Increment the number of times the traverser has gone through a looping section of traversal.
|
default boolean |
isHalted()
If the traverser has "no future" then it is done with its lifecycle.
|
void |
merge(Traverser.Admin<?> other)
When two traversers are
Traverser#equals to each other, then they can be merged. |
void |
resetLoops()
Set the number of times the traverser has gone through a loop back to 0.
|
void |
set(T t)
Set the current object location of the traverser.
|
void |
setBulk(long count)
Set the number of traversers represented by this traverser.
|
void |
setSideEffects(TraversalSideEffects sideEffects)
Set the sideEffects of the
Traversal . |
void |
setStepId(String stepId)
Set the step id of where the traverser is located.
|
Traverser.Admin<T> |
split()
Generate a sibling traverser of the current traverser with a full copy of all state within the sibling.
|
<R> Traverser.Admin<R> |
split(R r,
Step<T,R> step)
Generate a child traverser of the current traverser for current as step and new object location.
|
static final String HALT
void merge(Traverser.Admin<?> other)
Traverser#equals
to each other, then they can be merged.
This method is used to merge the traversers into a single traverser.
This is used for optimization where instead of enumerating all traversers, they can be counted.other
- the other traverser to merge into this traverser. Once merged, the other can be garbage collected.<R> Traverser.Admin<R> split(R r, Step<T,R> step)
R
- The current object type of the childr
- The current object of the childstep
- The step yielding the splitTraverser.Admin<T> split()
void set(T t)
t
- The current object of the traverservoid incrLoops(String stepLabel)
stepLabel
- the label of the step that is doing the incrementingvoid resetLoops()
String getStepId()
void setStepId(String stepId)
HALT
, then isHalted()
is true.stepId
- The future step of the traverserdefault boolean isHalted()
Traversal
.void setBulk(long count)
count
- the number of traversersTraverser.Admin<T> detach()
Traverser.Admin<T> attach(Vertex hostVertex)
attach
in interface Attachable<Traverser.Admin<T>>
hostVertex
- The vertex that is hosting the traverserdefault Traverser.Admin<T> attach(Graph graph) throws UnsupportedOperationException
UnsupportedOperationException
is thrown.attach
in interface Attachable<Traverser.Admin<T>>
graph
- the graph to attach the traverser to, which it can't.UnsupportedOperationException
- is always thrown as it makes no sense to attach a traverser to a graphvoid setSideEffects(TraversalSideEffects sideEffects)
Traversal
. Given that traversers can move between machines,
it may be important to re-set this when the traverser crosses machine boundaries.sideEffects
- the sideEffects of the traversal.TraversalSideEffects getSideEffects()
Copyright © 2013–2015 Apache Software Foundation. All rights reserved.