Class AbstractMergeElementStepPlaceholder<S,E>
- 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.AbstractMergeElementStepPlaceholder<S,E>
-
- All Implemented Interfaces:
Serializable,AutoCloseable,Cloneable,Iterator<Traverser.Admin<E>>,Step<S,E>,Deleting<Event>,GValueHolder<S,E>,MergeStepContract<S,E,Map>,Mutating<Event>,PopContaining,PropertiesHolder,TraversalOptionParent<Merge,S,Map>,TraversalParent,Writing<Event>
- Direct Known Subclasses:
MergeEdgeStepPlaceholder,MergeVertexStepPlaceholder
public abstract class AbstractMergeElementStepPlaceholder<S,E> extends FlatMapStep<S,E> implements MergeStepContract<S,E,Map>, GValueHolder<S,E>
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.PopContaining
PopContaining.PopInstruction
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanisStartprotected Traversal.Admin<?,Map<Object,Object>>mergeTraversalprotected Traversal.Admin<?,Map<Object,Object>>onCreateTraversalprotected Traversal.Admin<?,Map<Object,Object>>onMatchTraversalprotected Map<Object,List<Object>>properties-
Fields inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild
-
Fields inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeStepContract
CONCRETE_STEPS
-
-
Constructor Summary
Constructors Constructor Description AbstractMergeElementStepPlaceholder(Traversal.Admin traversal, Traversal.Admin<?,Map<Object,Object>> mergeTraversal, boolean isStart)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperty(Object key, Object value)This implementation should only be used as a mechanism for supportingPartitionStrategy.AbstractMergeElementStepPlaceholder<S,E>clone()Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.booleanequals(Object o)protected Iterator<E>flatMap(Traverser.Admin<S> traverser)Collection<GValue<?>>getGValues()List<Traversal.Admin<?,?>>getLocalChildren()Gets a list of all "local" child traversals for this step.ObjectgetMergeMapWithGValue()Gets the merge map from this step.Traversal.AdmingetMergeTraversal()CallbackRegistry<Event>getMutatingCallbackRegistry()Gets the callback registry for events that the step raises.ObjectgetOnCreateMapWithGValue()Gets the onCreate map from this step.Traversal.AdmingetOnCreateTraversal()ObjectgetOnMatchMapWithGValue()Gets the onMatch map from this step.Traversal.AdmingetOnMatchTraversal()Map<Object,List<Object>>getProperties()Map<Object,List<Object>>getPropertiesWithGValues()Set<TraverserRequirement>getRequirements()Provide the necessaryTraverserRequirementthat must be met by the traverser in order for the step to function properly.inthashCode()booleanisFirst()booleanisParameterized()booleanisStart()booleanisUsingPartitionStrategy()booleanremoveProperty(Object k)voidsetMerge(Traversal.Admin<?,Map<Object,Object>> mergeTraversal)voidsetOnCreate(Traversal.Admin<?,Map<Object,Object>> onCreateTraversal)voidsetOnMatch(Traversal.Admin<?,Map<Object,Object>> onMatchTraversal)voidsetTraversal(Traversal.Admin<?,?> parentTraversal)Set theTraversalthat this step is contained within.voidupdateVariable(String name, Object value)-
Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapStep
closeIterator, processNextStart, reset
-
Methods inherited from class org.apache.tinkerpop.gremlin.process.traversal.step.util.AbstractStep
addLabel, addStart, addStarts, clearLabels, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hasNext, hasStarts, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, setId, setNextStep, setPreviousStep, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.GValueHolder
asConcreteStep, reduce
-
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.map.MergeStepContract
reset
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Step
addLabel, addStart, addStarts, clearLabels, equals, getId, getLabels, getNextStep, getPreviousStep, getTraversal, hasStarts, removeLabel, reset, setId, setNextStep, setPreviousStep
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.TraversalOptionParent
addChildOption
-
Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.step.TraversalParent
addGlobalChild, addLocalChild, asStep, close, getGlobalChildren, getPopInstructions, getSelfAndChildRequirements, integrateChild, removeGlobalChild, removeLocalChild, replaceLocalChild
-
-
-
-
Field Detail
-
isStart
protected final boolean isStart
-
mergeTraversal
protected Traversal.Admin<?,Map<Object,Object>> mergeTraversal
-
onCreateTraversal
protected Traversal.Admin<?,Map<Object,Object>> onCreateTraversal
-
onMatchTraversal
protected Traversal.Admin<?,Map<Object,Object>> onMatchTraversal
-
-
Constructor Detail
-
AbstractMergeElementStepPlaceholder
public AbstractMergeElementStepPlaceholder(Traversal.Admin traversal, Traversal.Admin<?,Map<Object,Object>> mergeTraversal, boolean isStart)
-
-
Method Detail
-
flatMap
protected Iterator<E> flatMap(Traverser.Admin<S> traverser)
- Specified by:
flatMapin classFlatMapStep<S,E>
-
clone
public AbstractMergeElementStepPlaceholder<S,E> 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.
-
getRequirements
public Set<TraverserRequirement> getRequirements()
Description copied from interface:StepProvide the necessaryTraverserRequirementthat must be met by the traverser in order for the step to function properly. The provided default implements returns an empty set.- Specified by:
getRequirementsin interfaceMergeStepContract<S,E,Map>- Specified by:
getRequirementsin interfaceStep<S,E>- Returns:
- the set of requirements
-
setTraversal
public void setTraversal(Traversal.Admin<?,?> parentTraversal)
Description copied from interface:StepSet theTraversalthat this step is contained within.- Specified by:
setTraversalin interfaceStep<S,E>- Overrides:
setTraversalin classAbstractStep<S,E>- Parameters:
parentTraversal- the new traversal for this step
-
getLocalChildren
public List<Traversal.Admin<?,?>> 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
-
getMergeTraversal
public Traversal.Admin getMergeTraversal()
- Specified by:
getMergeTraversalin interfaceMergeStepContract<S,E,Map>
-
getMergeMapWithGValue
public Object getMergeMapWithGValue()
Description copied from interface:MergeStepContractGets the merge map from this step. If the map was originally passed as aGValue, that is returned directly. If it was originally passed as aMaporConstantTraversal, then aMapis returned. Otherwise, the MergeMap is returned in Traversal form.- Specified by:
getMergeMapWithGValuein interfaceMergeStepContract<S,E,Map>
-
getOnCreateTraversal
public Traversal.Admin getOnCreateTraversal()
- Specified by:
getOnCreateTraversalin interfaceMergeStepContract<S,E,Map>
-
getOnCreateMapWithGValue
public Object getOnCreateMapWithGValue()
Description copied from interface:MergeStepContractGets the onCreate map from this step. If the map was originally passed as aGValue, that is returned directly. If it was originally passed as aMaporConstantTraversal, then aMapis returned. Otherwise, the onCreate is returned in Traversal form.- Specified by:
getOnCreateMapWithGValuein interfaceMergeStepContract<S,E,Map>
-
getOnMatchTraversal
public Traversal.Admin getOnMatchTraversal()
- Specified by:
getOnMatchTraversalin interfaceMergeStepContract<S,E,Map>
-
getOnMatchMapWithGValue
public Object getOnMatchMapWithGValue()
Description copied from interface:MergeStepContractGets the onMatch map from this step. If the map was originally passed as aGValue, that is returned directly. If it was originally passed as aMaporConstantTraversal, then aMapis returned. Otherwise, the onMatch is returned in Traversal form.- Specified by:
getOnMatchMapWithGValuein interfaceMergeStepContract<S,E,Map>
-
isStart
public boolean isStart()
- Specified by:
isStartin interfaceMergeStepContract<S,E,Map>
-
isFirst
public boolean isFirst()
- Specified by:
isFirstin interfaceMergeStepContract<S,E,Map>
-
isUsingPartitionStrategy
public boolean isUsingPartitionStrategy()
- Specified by:
isUsingPartitionStrategyin interfaceMergeStepContract<S,E,Map>
-
setOnMatch
public void setOnMatch(Traversal.Admin<?,Map<Object,Object>> onMatchTraversal)
- Specified by:
setOnMatchin interfaceMergeStepContract<S,E,Map>
-
setOnCreate
public void setOnCreate(Traversal.Admin<?,Map<Object,Object>> onCreateTraversal)
- Specified by:
setOnCreatein interfaceMergeStepContract<S,E,Map>
-
setMerge
public void setMerge(Traversal.Admin<?,Map<Object,Object>> mergeTraversal)
- Specified by:
setMergein interfaceMergeStepContract<S,E,Map>
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classAbstractStep<S,E>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractStep<S,E>
-
isParameterized
public boolean isParameterized()
- Specified by:
isParameterizedin interfaceGValueHolder<S,E>
-
updateVariable
public void updateVariable(String name, Object value)
- Specified by:
updateVariablein interfaceGValueHolder<S,E>
-
getGValues
public Collection<GValue<?>> getGValues()
- Specified by:
getGValuesin interfaceGValueHolder<S,E>
-
getMutatingCallbackRegistry
public CallbackRegistry<Event> getMutatingCallbackRegistry()
Description copied from interface:MutatingGets the callback registry for events that the step raises.- Specified by:
getMutatingCallbackRegistryin interfaceMutating<S>
-
addProperty
public void addProperty(Object key, Object value)
This implementation should only be used as a mechanism for supportingPartitionStrategy.- Specified by:
addPropertyin interfacePropertiesHolder
-
getProperties
public Map<Object,List<Object>> getProperties()
- Specified by:
getPropertiesin interfacePropertiesHolder
-
getPropertiesWithGValues
public Map<Object,List<Object>> getPropertiesWithGValues()
- Specified by:
getPropertiesWithGValuesin interfacePropertiesHolder
-
removeProperty
public boolean removeProperty(Object k)
- Specified by:
removePropertyin interfacePropertiesHolder
-
-