public abstract class SupplyingBarrierStep<S,E> extends AbstractStep<S,E> implements Barrier<Boolean>
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild
Constructor and Description |
---|
SupplyingBarrierStep(Traversal.Admin traversal) |
Modifier and Type | Method and Description |
---|---|
void |
addBarrier(Boolean barrier)
Add a barrier to the step.
|
void |
addStart(Traverser.Admin<S> start)
Add a single
Traverser.Admin to the step. |
void |
addStarts(Iterator<Traverser.Admin<S>> starts)
Add an iterator of
Traverser.Admin objects of type S to the step. |
SupplyingBarrierStep<S,E> |
clone()
Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.
|
void |
done()
A way to hard set that the barrier is complete.
|
MemoryComputeKey<Boolean> |
getMemoryComputeKey()
The
MemoryComputeKey that will be used by this step. |
boolean |
hasNextBarrier()
Whether or not the step has an accessible barrier.
|
Boolean |
nextBarrier()
Get the next barrier within this step.
|
void |
processAllStarts()
Process all left traversers by do not yield the resultant output.
|
Traverser.Admin<E> |
processNextStart() |
void |
reset()
Reset the state of the step such that it has no incoming starts.
|
protected abstract E |
supply() |
addLabel, equals, getId, getLabels, getNextStep, getPreviousStep, getStarts, getTraversal, hashCode, hasNext, hasStarts, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, setId, setNextStep, setPreviousStep, setTraversal, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
equals, getRequirements
forEachRemaining, remove
public SupplyingBarrierStep(Traversal.Admin traversal)
protected abstract E supply()
public void addStarts(Iterator<Traverser.Admin<S>> starts)
Step
Traverser.Admin
objects of type S to the step.public void addStart(Traverser.Admin<S> start)
Step
Traverser.Admin
to the step.public void reset()
Step
public Traverser.Admin<E> processNextStart()
processNextStart
in class AbstractStep<S,E>
public SupplyingBarrierStep<S,E> clone()
Step
Step.reset()
is called. Moreover, the previous and next steps should be set to EmptyStep
.public void processAllStarts()
Barrier
ReducingBarrierStep
, where traversers can be processed "on the fly" and thus, reduce memory consumption.processAllStarts
in interface Barrier<Boolean>
public boolean hasNextBarrier()
Barrier
hasNextBarrier
in interface Barrier<Boolean>
public Boolean nextBarrier() throws NoSuchElementException
Barrier
nextBarrier
in interface Barrier<Boolean>
NoSuchElementException
public void addBarrier(Boolean barrier)
Barrier
addBarrier
in interface Barrier<Boolean>
barrier
- the barrier to merge inpublic void done()
Barrier
public MemoryComputeKey<Boolean> getMemoryComputeKey()
MemoryComputing
MemoryComputeKey
that will be used by this step.getMemoryComputeKey
in interface MemoryComputing<Boolean>
Copyright © 2013–2022 Apache Software Foundation. All rights reserved.