Class MergeEdgeStep<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.MergeElementStep<S,Edge,Map<Object,Object>>
org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeEdgeStep<S>
- All Implemented Interfaces:
Serializable,AutoCloseable,Cloneable,Iterator<Traverser.Admin<Edge>>,Step<S,,Edge> Deleting<Event>,MergeStepContract<S,,Edge, Map<Object, Object>> Mutating<Event>,PopContaining,PropertiesHolder,TraversalOptionParent<Merge,,S, Map<Object, Object>> TraversalParent,Writing<Event>
Implementation for the
mergeE() step covering both the start step version and the one used mid-traversal.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.PopContaining
PopContaining.PopInstruction -
Field Summary
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeElementStep
callbackRegistry, first, isStart, mergeTraversal, onCreateTraversal, onMatchTraversal, usesPartitionStrategyFields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChildFields inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeStepContract
CONCRETE_STEPS -
Constructor Summary
ConstructorsConstructorDescriptionMergeEdgeStep(Traversal.Admin traversal, boolean isStart) MergeEdgeStep(Traversal.Admin traversal, boolean isStart, Map<Object, Object> merge) MergeEdgeStep(Traversal.Admin traversal, boolean isStart, Traversal.Admin<S, Map<Object, Object>> mergeTraversal) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChildOption(Merge token, Traversal.Admin<S, Map<Object, Object>> traversalOption) clone()Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.flatMap(Traverser.Admin<S> traverser) protected SetGets the traversal that will be used to provide theMapthat will be used to identify the Direction.IN vertex during merge.<S,C> List<Traversal.Admin<S, C>> Gets a list of all "local" child traversals for this step.Gets the traversal that will be used to provide theMapthat will be used to identify the Direction.OUT vertex during merge.inthashCode()protected MaponCreateMap(Traverser.Admin<S> traverser, Map unresolvedMergeMap, Map mergeMap) voidreset()Reset the state of the step such that it has no incoming starts.protected VertexresolveVertex(Object arg) protected voidresolveVertex(Merge token, Direction direction, Map map, Traverser.Admin<S> traverser, Traversal.Admin<S, Object> traversal) protected VertexresolveVertex(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.voidsetTraversal(Traversal.Admin<?, ?> parentTraversal) Set theTraversalthat this step is contained within.toString()protected Vertexstatic voidvalidateMapInput(Map map, boolean ignoreTokens) Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeElementStep
addProperty, getCallbackRegistry, getGraph, getMergeTraversal, getMutatingCallbackRegistry, getOnCreateTraversal, getOnMatchTraversal, getProperties, getRequirements, isFirst, isStart, isUsingPartitionStrategy, materializeMap, processNextStart, removeProperty, searchVertices, searchVerticesLabelConstraint, searchVerticesPropertyConstraints, searchVerticesTraversal, setMerge, setOnCreate, setOnMatch, validate, validate, validateNoOverrides, validateStaticNoOverridesMethods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep
closeIteratorMethods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
addLabel, addStart, addStarts, clearLabels, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hasNext, hasStarts, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, setId, setNextStep, setPreviousStepMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, removeMethods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeStepContract
getMergeMapWithGValue, getOnCreateMapWithGValue, getOnMatchMapWithGValueMethods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.PropertiesHolder
getPropertiesWithGValuesMethods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent
addGlobalChild, addLocalChild, asStep, close, getGlobalChildren, getPopInstructions, getSelfAndChildRequirements, integrateChild, removeGlobalChild, removeLocalChild, replaceLocalChild
-
Constructor Details
-
MergeEdgeStep
-
MergeEdgeStep
-
MergeEdgeStep
public MergeEdgeStep(Traversal.Admin traversal, boolean isStart, Traversal.Admin<S, Map<Object, Object>> mergeTraversal)
-
-
Method Details
-
validateMapInput
-
getOutVTraversal
Gets the traversal that will be used to provide theMapthat will be used to identify the Direction.OUT vertex during merge. -
getInVTraversal
Gets the traversal that will be used to provide theMapthat will be used to identify the Direction.IN vertex during merge. -
addChildOption
Description copied from interface:TraversalOptionParentThe child as defined by the token it takes, likePickorMerge. This traversal may be of local or global scope depending on the step implementation that works withoption().- Specified by:
addChildOptionin interfaceTraversalOptionParent<Merge,S, Map<Object, Object>> - Overrides:
addChildOptionin classMergeElementStep<S,Edge, Map<Object, Object>>
-
getLocalChildren
Description copied from interface:TraversalParentGets a list of all "local" child traversals for this step. A "local" traversal is one which is evaluated independently for each incoming traverser to the parent step. This is typically used in cases where the child is used to process or augment each traverser individually. SeeLocalSteporByModulatingas examples.- Specified by:
getLocalChildrenin interfaceTraversalParent- Overrides:
getLocalChildrenin classMergeElementStep<S,Edge, Map<Object, Object>>
-
hashCode
public int hashCode() -
reset
public void reset()Description copied from interface:StepReset the state of the step such that it has no incoming starts. Internal states are to be reset, but any sideEffect data structures are not to be recreated. -
toString
-
setTraversal
Description copied from interface:StepSet theTraversalthat this step is contained within.- Specified by:
setTraversalin interfaceStep<S,Edge> - Overrides:
setTraversalin classMergeElementStep<S,Edge, Map<Object, Object>> - Parameters:
parentTraversal- the new traversal for this step
-
clone
Description copied from interface:StepCloning 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
- Specified by:
getAllowedTokensin classMergeElementStep<S,Edge, Map<Object, Object>>
-
searchEdges
Translate the Map into search criteria. Default implementation is to translate the Map into a g.E() or g.V().out/inE() 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. -
resolveVertices
-
resolveVertex
protected void resolveVertex(Merge token, Direction direction, Map map, Traverser.Admin<S> traverser, Traversal.Admin<S, Object> traversal) -
flatMap
-
onCreateMap
-
resolveVertex
-
resolveVertex
-
tryAttachVertex
-