Class MergeVertexStep<S>
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep<S,E>
-
- org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep<S,E>
-
- org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeStep<S,Vertex,Map>
-
- org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeVertexStep<S>
-
- All Implemented Interfaces:
Serializable
,AutoCloseable
,Cloneable
,Iterator<Traverser.Admin<Vertex>>
,Step<S,Vertex>
,Configuring
,Mutating<Event>
,Parameterizing
,TraversalOptionParent<Merge,S,Map>
,TraversalParent
public class MergeVertexStep<S> extends MergeStep<S,Vertex,Map>
Implementation for themergeV()
step covering both the start step version and the one used mid-traversal.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeStep
callbackRegistry, first, isStart, mergeTraversal, onCreateTraversal, onMatchTraversal
-
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild
-
-
Constructor Summary
Constructors Constructor Description MergeVertexStep(Traversal.Admin traversal, boolean isStart)
MergeVertexStep(Traversal.Admin traversal, boolean isStart, Map merge)
MergeVertexStep(Traversal.Admin traversal, boolean isStart, Traversal.Admin<S,Map> mergeTraversal)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MergeVertexStep<S>
clone()
Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.protected Iterator<Vertex>
flatMap(Traverser.Admin<S> traverser)
protected Set
getAllowedTokens()
protected Map
onCreateMap(Traverser.Admin<S> traverser, Map mergeMap)
Fuse the mergeMap with any additional key/values from the onCreateTraversal.protected CloseableIterator<Vertex>
searchVertices(Map search)
Translate the Map into search criteria.static CloseableIterator<Vertex>
searchVertices(Graph graph, Map search)
Translate the Map into a g.V() traversal against the supplied graph.static void
validateMapInput(Map map, boolean ignoreTokens)
-
Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeStep
addChildOption, configure, getCallbackRegistry, getGraph, getLocalChildren, getMergeTraversal, getMutatingCallbackRegistry, getOnCreateTraversal, getOnMatchTraversal, getParameters, getRequirements, hashCode, isFirst, isStart, materializeMap, processNextStart, reset, setTraversal, toString, validate, validate, validateNoOverrides
-
Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep
closeIterator
-
Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
addLabel, addStart, addStarts, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hasNext, hasStarts, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, setId, setNextStep, setPreviousStep
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent
addGlobalChild, addLocalChild, asStep, close, getGlobalChildren, getSelfAndChildRequirements, integrateChild, removeGlobalChild, removeLocalChild, replaceLocalChild
-
-
-
-
Constructor Detail
-
MergeVertexStep
public MergeVertexStep(Traversal.Admin traversal, boolean isStart)
-
MergeVertexStep
public MergeVertexStep(Traversal.Admin traversal, boolean isStart, Map merge)
-
MergeVertexStep
public MergeVertexStep(Traversal.Admin traversal, boolean isStart, Traversal.Admin<S,Map> mergeTraversal)
-
-
Method Detail
-
validateMapInput
public static void validateMapInput(Map map, boolean ignoreTokens)
-
clone
public MergeVertexStep<S> clone()
Description copied from interface:Step
Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication. When cloning a step, it is important that the steps, the cloned step is equivalent to the state of the step whenStep.reset()
is called. Moreover, the previous and next steps should be set toEmptyStep
.
-
getAllowedTokens
protected Set getAllowedTokens()
- Specified by:
getAllowedTokens
in classMergeStep<S,Vertex,Map>
-
searchVertices
public static CloseableIterator<Vertex> searchVertices(Graph graph, Map search)
Translate the Map into a g.V() traversal against the supplied graph. Graph providers will presumably optimize this traversal to use whatever indices are present and appropriate for efficiency. Callers are responsible for closing this iterator when finished.
-
searchVertices
protected CloseableIterator<Vertex> searchVertices(Map search)
Translate the Map into search criteria. Default implementation is to translate the Map into a g.V() traversal. Graph providers will presumably optimize this traversal to use whatever indices are present and appropriate for efficiency. Callers are responsible for closing this iterator when finished.
-
flatMap
protected Iterator<Vertex> flatMap(Traverser.Admin<S> traverser)
-
onCreateMap
protected Map onCreateMap(Traverser.Admin<S> traverser, Map mergeMap)
Fuse the mergeMap with any additional key/values from the onCreateTraversal. No overrides allowed.
-
-