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, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
equals, getRequirements
forEachRemaining, remove
public 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()
Step
public void addStarts(Iterator<Traverser<S>> starts)
Step
Traverser
objects of type S to the step.public void addStart(Traverser<S> start)
Step
Traverser
to the step.public void processAllStarts()
Barrier
ReducingBarrierStep
, where traversers can be processed "on the fly" and thus, reduce memory consumption.processAllStarts
in interface Barrier
public Traverser<E> processNextStart()
processNextStart
in class AbstractStep<S,E>
public ReducingBarrierStep<S,E> clone()
Step
EmptyStep
.public MapReduce getMapReduce()
getMapReduce
in interface MapReducer
Copyright © 2013–2017 Apache Software Foundation. All rights reserved.