public abstract class ReducingBarrierStep<S,E> extends AbstractStep<S,E> implements MapReducer, Barrier
| Modifier and Type | Class and Description |
|---|---|
static class |
ReducingBarrierStep.DefaultMapReduce |
| Modifier and Type | Field and Description |
|---|---|
static String |
REDUCING |
protected BiFunction<E,Traverser<S>,E> |
reducingBiFunction |
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 |
addStart(Traverser<S> start)
Add a single
Traverser to the step. |
void |
addStarts(Iterator<Traverser<S>> starts)
Add a iterator of
Traverser objects of type S to the step. |
ReducingBarrierStep<S,E> |
clone()
Cloning is used to duplicate steps for the purpose of traversal optimization and OLTP replication.
|
MapReduce |
getMapReduce() |
void |
processAllStarts()
Process all left traversers by do not yield the resultant output.
|
Traverser<E> |
processNextStart() |
void |
reset()
Reset the state of the step such that it has no incoming starts.
|
void |
setBiFunction(BiFunction<E,Traverser<S>,E> reducingBiFunction) |
void |
setSeedSupplier(Supplier<E> seedSupplier) |
addLabel, equals, getId, getLabels, getNextStep, getPreviousStep, getTraversal, hashCode, hasNext, next, removeLabel, setId, setNextStep, setPreviousStep, setTraversal, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitequals, getRequirementsforEachRemaining, removepublic static final String REDUCING
protected BiFunction<E,Traverser<S>,E> reducingBiFunction
public ReducingBarrierStep(Traversal.Admin traversal)
public void setBiFunction(BiFunction<E,Traverser<S>,E> reducingBiFunction)
public void reset()
Steppublic void addStarts(Iterator<Traverser<S>> starts)
StepTraverser objects of type S to the step.public void addStart(Traverser<S> start)
StepTraverser to the step.public void processAllStarts()
BarrierReducingBarrierStep, where traversers can be processed "on the fly" and thus, reduce memory consumption.processAllStarts in interface Barrierpublic Traverser<E> processNextStart()
processNextStart in class AbstractStep<S,E>public ReducingBarrierStep<S,E> clone()
StepEmptyStep.public MapReduce getMapReduce()
getMapReduce in interface MapReducerCopyright © 2013–2017 Apache Software Foundation. All rights reserved.