public class MergeEdgeStep<S> extends MergeStep<S,Edge,Object>
mergeE()
step covering both the start step version and the one used mid-traversal.callbackRegistry, first, isStart, mergeTraversal, onCreateTraversal, onMatchTraversal
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild
Constructor and Description |
---|
MergeEdgeStep(Traversal.Admin traversal,
boolean isStart) |
MergeEdgeStep(Traversal.Admin traversal,
boolean isStart,
Map merge) |
MergeEdgeStep(Traversal.Admin traversal,
boolean isStart,
Traversal.Admin<S,Map> mergeTraversal) |
Modifier and Type | Method and Description |
---|---|
void |
addChildOption(Merge token,
Traversal.Admin<S,Object> traversalOption)
|
MergeEdgeStep<S> |
clone()
Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.
|
protected Iterator<Edge> |
flatMap(Traverser.Admin<S> traverser) |
protected Set |
getAllowedTokens() |
Traversal.Admin<S,Object> |
getInVTraversal()
Gets the traversal that will be used to provide the
Map that will be used to identify the Direction.IN
vertex during merge. |
<S,C> List<Traversal.Admin<S,C>> |
getLocalChildren() |
Traversal.Admin<S,Object> |
getOutVTraversal()
Gets the traversal that will be used to provide the
Map that will be used to identify the Direction.OUT
vertex during merge. |
int |
hashCode() |
protected Map |
onCreateMap(Traverser.Admin<S> traverser,
Map unresolvedMergeMap,
Map mergeMap) |
void |
reset()
Reset the state of the step such that it has no incoming starts.
|
protected void |
resolveVertex(Merge token,
Direction direction,
Map map,
Traverser.Admin<S> traverser,
Traversal.Admin<S,Object> traversal) |
protected Vertex |
resolveVertex(Object arg) |
protected Vertex |
resolveVertex(Traverser.Admin<S> traverser,
Traversal.Admin<S,Object> traversal) |
protected Map<?,?> |
resolveVertices(Map map,
Traverser.Admin<S> traverser) |
protected CloseableIterator<Edge> |
searchEdges(Map search)
Translate the Map into search criteria.
|
void |
setTraversal(Traversal.Admin<?,?> parentTraversal)
Set the
Traversal that this step is contained within. |
String |
toString() |
protected Vertex |
tryAttachVertex(Vertex v)
|
static void |
validateMapInput(Map map,
boolean ignoreTokens) |
configure, getCallbackRegistry, getGraph, getMergeTraversal, getMutatingCallbackRegistry, getOnCreateTraversal, getOnMatchTraversal, getParameters, getRequirements, isFirst, isStart, materializeMap, processNextStart, searchVertices, searchVerticesLabelConstraint, searchVerticesPropertyConstraints, searchVerticesTraversal, validate, validate, validateNoOverrides
closeIterator
addLabel, addStart, addStarts, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hasNext, hasStarts, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, setId, setNextStep, setPreviousStep
finalize, getClass, notify, notifyAll, wait, wait, wait
addGlobalChild, addLocalChild, asStep, close, getGlobalChildren, getSelfAndChildRequirements, integrateChild, removeGlobalChild, removeLocalChild, replaceLocalChild
forEachRemaining, remove
public MergeEdgeStep(Traversal.Admin traversal, boolean isStart)
public MergeEdgeStep(Traversal.Admin traversal, boolean isStart, Map merge)
public MergeEdgeStep(Traversal.Admin traversal, boolean isStart, Traversal.Admin<S,Map> mergeTraversal)
public static void validateMapInput(Map map, boolean ignoreTokens)
public Traversal.Admin<S,Object> getOutVTraversal()
Map
that will be used to identify the Direction.OUT
vertex during merge.public Traversal.Admin<S,Object> getInVTraversal()
Map
that will be used to identify the Direction.IN
vertex during merge.public void addChildOption(Merge token, Traversal.Admin<S,Object> traversalOption)
TraversalOptionParent
Pick
or Merge
. This traversal may be of local
or global scope depending on the step implementation that works with option()
.addChildOption
in interface TraversalOptionParent<Merge,S,Object>
addChildOption
in class MergeStep<S,Edge,Object>
public <S,C> List<Traversal.Admin<S,C>> getLocalChildren()
getLocalChildren
in interface TraversalParent
getLocalChildren
in class MergeStep<S,Edge,Object>
public void reset()
Step
public void setTraversal(Traversal.Admin<?,?> parentTraversal)
Step
Traversal
that this step is contained within.setTraversal
in interface Step<S,Edge>
setTraversal
in class MergeStep<S,Edge,Object>
parentTraversal
- the new traversal for this steppublic MergeEdgeStep<S> clone()
Step
Step.reset()
is called. Moreover, the previous and next steps should be set to EmptyStep
.protected Set getAllowedTokens()
getAllowedTokens
in class MergeStep<S,Edge,Object>
protected CloseableIterator<Edge> searchEdges(Map search)
protected Map<?,?> resolveVertices(Map map, Traverser.Admin<S> traverser)
protected void resolveVertex(Merge token, Direction direction, Map map, Traverser.Admin<S> traverser, Traversal.Admin<S,Object> traversal)
protected Iterator<Edge> flatMap(Traverser.Admin<S> traverser)
protected Map onCreateMap(Traverser.Admin<S> traverser, Map unresolvedMergeMap, Map mergeMap)
protected Vertex resolveVertex(Traverser.Admin<S> traverser, Traversal.Admin<S,Object> traversal)
Copyright © 2013–2023 Apache Software Foundation. All rights reserved.