public final class DedupGlobalStep<S> extends FilterStep<S> implements TraversalParent, Scoping, GraphComputing, Barrier<Map<Object,Traverser.Admin<S>>>, ByModulating, PathProcessor
Scoping.KeyNotFoundException, Scoping.VariablePathProcessor.ElementRequirementid, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild| Constructor and Description |
|---|
DedupGlobalStep(Traversal.Admin traversal,
String... dedupLabels) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBarrier(Map<Object,Traverser.Admin<S>> barrier)
Add a barrier to the step.
|
void |
atMaster(boolean atMaster)
Some steps should behave different whether they are executing at the master traversal or distributed across the worker traversals.
|
DedupGlobalStep<S> |
clone()
Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.
|
protected boolean |
filter(Traverser.Admin<S> traverser) |
Set<String> |
getKeepLabels() |
List<Traversal<S,Object>> |
getLocalChildren() |
PathProcessor.ElementRequirement |
getMaxRequirement() |
MemoryComputeKey<Map<Object,Traverser.Admin<S>>> |
getMemoryComputeKey()
The
MemoryComputeKey that will be used by this step. |
Set<TraverserRequirement> |
getRequirements()
Provide the necessary
TraverserRequirement that must be met by the traverser in order for the step to
function properly. |
Set<String> |
getScopeKeys()
Get the labels that this scoping step will access during the traversal
|
int |
hashCode() |
boolean |
hasNextBarrier()
Whether or not the step has an accessible barrier.
|
void |
modulateBy(Traversal.Admin<?,?> dedupTraversal) |
Map<Object,Traverser.Admin<S>> |
nextBarrier()
Get the next barrier within this step.
|
void |
onGraphComputer()
The step will be executing on a
GraphComputer. |
void |
processAllStarts()
Process all left traversers by do not yield the resultant output.
|
protected Traverser.Admin<S> |
processNextStart() |
void |
replaceLocalChild(Traversal.Admin<?,?> oldTraversal,
Traversal.Admin<?,?> newTraversal) |
void |
reset()
Reset the state of the step such that it has no incoming starts.
|
void |
setKeepLabels(Set<String> keepLabels) |
void |
setTraversal(Traversal.Admin<?,?> parentTraversal)
Set the
Traversal that this step is contained within. |
String |
toString() |
addLabel, addStart, addStarts, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hasNext, hasStarts, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, setId, setNextStep, setPreviousStepfinalize, getClass, notify, notifyAll, wait, wait, waitaddGlobalChild, addLocalChild, asStep, close, getGlobalChildren, getSelfAndChildRequirements, integrateChild, removeGlobalChild, removeLocalChildgetNullableScopeValue, getSafeScopeValue, getScopeValueatMastermodulateBy, modulateBy, modulateBy, modulateBy, modulateBy, modulateBy, modulateBy, modulateBy, modulateBy, modulateBy, modulateByprocessTraverserPathLabelsforEachRemaining, removepublic DedupGlobalStep(Traversal.Admin traversal, String... dedupLabels)
protected boolean filter(Traverser.Admin<S> traverser)
filter in class FilterStep<S>public void atMaster(boolean atMaster)
GraphComputingatMaster in interface GraphComputingatMaster - whether the step is currently executing at masterpublic PathProcessor.ElementRequirement getMaxRequirement()
getMaxRequirement in interface PathProcessorprotected Traverser.Admin<S> processNextStart()
processNextStart in class FilterStep<S>public List<Traversal<S,Object>> getLocalChildren()
getLocalChildren in interface TraversalParentpublic void modulateBy(Traversal.Admin<?,?> dedupTraversal)
modulateBy in interface ByModulatingpublic void replaceLocalChild(Traversal.Admin<?,?> oldTraversal, Traversal.Admin<?,?> newTraversal)
replaceLocalChild in interface TraversalParentpublic DedupGlobalStep<S> clone()
StepStep.reset() is called. Moreover, the previous and next steps should be set to EmptyStep.public void setTraversal(Traversal.Admin<?,?> parentTraversal)
StepTraversal that this step is contained within.setTraversal in interface Step<S,S>setTraversal in class AbstractStep<S,S>parentTraversal - the new traversal for this steppublic int hashCode()
hashCode in class AbstractStep<S,S>public void reset()
Steppublic String toString()
toString in class AbstractStep<S,S>public Set<TraverserRequirement> getRequirements()
StepTraverserRequirement that must be met by the traverser in order for the step to
function properly. The provided default implements returns an empty set.getRequirements in interface Step<S,S>public void onGraphComputer()
GraphComputingGraphComputer.onGraphComputer in interface GraphComputingpublic Set<String> getScopeKeys()
ScopinggetScopeKeys in interface Scopingpublic void processAllStarts()
BarrierReducingBarrierStep, where traversers can be processed "on the fly" and thus, reduce memory consumption.processAllStarts in interface Barrier<Map<Object,Traverser.Admin<S>>>public boolean hasNextBarrier()
BarrierhasNextBarrier in interface Barrier<Map<Object,Traverser.Admin<S>>>public Map<Object,Traverser.Admin<S>> nextBarrier() throws NoSuchElementException
BarriernextBarrier in interface Barrier<Map<Object,Traverser.Admin<S>>>NoSuchElementExceptionpublic void addBarrier(Map<Object,Traverser.Admin<S>> barrier)
BarrieraddBarrier in interface Barrier<Map<Object,Traverser.Admin<S>>>barrier - the barrier to merge inpublic MemoryComputeKey<Map<Object,Traverser.Admin<S>>> getMemoryComputeKey()
MemoryComputingMemoryComputeKey that will be used by this step.getMemoryComputeKey in interface MemoryComputing<Map<Object,Traverser.Admin<S>>>public void setKeepLabels(Set<String> keepLabels)
setKeepLabels in interface PathProcessorpublic Set<String> getKeepLabels()
getKeepLabels in interface PathProcessorCopyright © 2013–2021 Apache Software Foundation. All rights reserved.