public abstract class ReducingBarrierStep<S,E> extends AbstractStep<S,E> implements Barrier<E>, Generating<E,E>
| Modifier and Type | Field and Description |
|---|---|
protected BinaryOperator<E> |
reducingBiOperator |
protected Supplier<E> |
seedSupplier |
id, labels, nextEnd, nextStep, previousStep, starts, traversal, traverserStepIdAndLabelsSetByChild| Constructor and Description |
|---|
ReducingBarrierStep(Traversal.Admin traversal) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBarrier(E barrier)
Add a barrier to the step.
|
ReducingBarrierStep<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.
|
BinaryOperator<E> |
getBiOperator() |
MemoryComputeKey<E> |
getMemoryComputeKey()
The
MemoryComputeKey that will be used by this step. |
Supplier<E> |
getSeedSupplier() |
boolean |
hasNextBarrier()
Whether or not the step has an accessible barrier.
|
E |
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() |
abstract E |
projectTraverser(Traverser.Admin<S> traverser) |
void |
reset()
Reset the state of the step such that it has no incoming starts.
|
void |
setReducingBiOperator(BinaryOperator<E> reducingBiOperator) |
void |
setSeedSupplier(Supplier<E> seedSupplier) |
addLabel, addStart, addStarts, equals, getId, getLabels, getNextStep, getPreviousStep, getTraversal, hashCode, hasNext, next, removeLabel, setId, setNextStep, setPreviousStep, setTraversal, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitgenerateFinalResultequals, getRequirementsforEachRemaining, removeprotected BinaryOperator<E> reducingBiOperator
public ReducingBarrierStep(Traversal.Admin traversal)
public abstract E projectTraverser(Traverser.Admin<S> traverser)
public void setReducingBiOperator(BinaryOperator<E> reducingBiOperator)
public BinaryOperator<E> getBiOperator()
public void reset()
Steppublic void done()
Barrierpublic void processAllStarts()
BarrierReducingBarrierStep, where traversers can be processed "on the fly" and thus, reduce memory consumption.processAllStarts in interface Barrier<E>public boolean hasNextBarrier()
BarrierhasNextBarrier in interface Barrier<E>public E nextBarrier()
BarriernextBarrier in interface Barrier<E>public void addBarrier(E barrier)
BarrieraddBarrier in interface Barrier<E>barrier - the barrier to merge inpublic Traverser.Admin<E> processNextStart()
processNextStart in class AbstractStep<S,E>public ReducingBarrierStep<S,E> clone()
StepEmptyStep.public MemoryComputeKey<E> getMemoryComputeKey()
MemoryComputingMemoryComputeKey that will be used by this step.getMemoryComputeKey in interface MemoryComputing<E>Copyright © 2013–2017 Apache Software Foundation. All rights reserved.