public final class DedupGlobalStep<S> extends FilterStep<S> implements TraversalParent, Scoping, GraphComputing, Barrier<Map<Object,Traverser.Admin<S>>>, ByModulating, PathProcessor
Scoping.Variable
PathProcessor.ElementRequirement
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild
TYPICAL_GLOBAL_REQUIREMENTS, TYPICAL_GLOBAL_REQUIREMENTS_ARRAY, TYPICAL_LOCAL_REQUIREMENTS, TYPICAL_LOCAL_REQUIREMENTS_ARRAY
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() |
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 |
reset()
Reset the state of the step such that it has no incoming starts.
|
void |
setKeepLabels(Set<String> labels) |
void |
setTraversal(Traversal.Admin<?,?> parentTraversal)
Set the
Traversal that this step is contained within. |
String |
toString() |
addLabel, addStart, addStarts, equals, getId, getLabels, getNextStep, getPreviousStep, getTraversal, hasNext, next, removeLabel, setId, setNextStep, setPreviousStep
finalize, getClass, notify, notifyAll, wait, wait, wait
addGlobalChild, addLocalChild, asStep, close, getGlobalChildren, getSelfAndChildRequirements, integrateChild, removeGlobalChild, removeLocalChild
getNullableScopeValue, getScopeValue
atMaster
modulateBy, modulateBy, modulateBy, modulateBy, modulateBy, modulateBy, modulateBy, modulateBy, modulateBy, modulateBy, modulateBy
processTraverserPathLabels
forEachRemaining, remove
public DedupGlobalStep(Traversal.Admin traversal, String... dedupLabels)
protected boolean filter(Traverser.Admin<S> traverser)
filter
in class FilterStep<S>
public void atMaster(boolean atMaster)
GraphComputing
atMaster
in interface GraphComputing
atMaster
- whether the step is currently executing at masterpublic PathProcessor.ElementRequirement getMaxRequirement()
getMaxRequirement
in interface PathProcessor
protected Traverser.Admin<S> processNextStart()
processNextStart
in class FilterStep<S>
public List<Traversal<S,Object>> getLocalChildren()
getLocalChildren
in interface TraversalParent
public void modulateBy(Traversal.Admin<?,?> dedupTraversal)
modulateBy
in interface ByModulating
public DedupGlobalStep<S> clone()
Step
EmptyStep
.public void setTraversal(Traversal.Admin<?,?> parentTraversal)
Step
Traversal
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()
Step
public String toString()
toString
in class AbstractStep<S,S>
public Set<TraverserRequirement> getRequirements()
Step
TraverserRequirement
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()
GraphComputing
GraphComputer
.onGraphComputer
in interface GraphComputing
public Set<String> getScopeKeys()
getScopeKeys
in interface Scoping
public void processAllStarts()
Barrier
ReducingBarrierStep
, 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()
Barrier
hasNextBarrier
in interface Barrier<Map<Object,Traverser.Admin<S>>>
public Map<Object,Traverser.Admin<S>> nextBarrier() throws NoSuchElementException
Barrier
nextBarrier
in interface Barrier<Map<Object,Traverser.Admin<S>>>
NoSuchElementException
public void addBarrier(Map<Object,Traverser.Admin<S>> barrier)
Barrier
addBarrier
in interface Barrier<Map<Object,Traverser.Admin<S>>>
barrier
- the barrier to merge inpublic MemoryComputeKey<Map<Object,Traverser.Admin<S>>> getMemoryComputeKey()
MemoryComputing
MemoryComputeKey
that will be used by this step.getMemoryComputeKey
in interface MemoryComputing<Map<Object,Traverser.Admin<S>>>
public void setKeepLabels(Set<String> labels)
setKeepLabels
in interface PathProcessor
public Set<String> getKeepLabels()
getKeepLabels
in interface PathProcessor
Copyright © 2013–2017 Apache Software Foundation. All rights reserved.