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, getStarts, getTraversal, hashCode, hasNext, isTraverserStepIdAndLabelsSetByChild, next, prepareTraversalForNextStep, removeLabel, setId, setNextStep, setPreviousStep, setTraversal, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
generateFinalResult
equals, getRequirements
forEachRemaining, remove
protected 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()
Step
public void done()
Barrier
public void processAllStarts()
Barrier
ReducingBarrierStep
, where traversers can be processed "on the fly" and thus, reduce memory consumption.processAllStarts
in interface Barrier<E>
public boolean hasNextBarrier()
Barrier
hasNextBarrier
in interface Barrier<E>
public E nextBarrier()
Barrier
nextBarrier
in interface Barrier<E>
public void addBarrier(E barrier)
Barrier
addBarrier
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()
Step
Step.reset()
is called. Moreover, the previous and next steps should be set to EmptyStep
.public MemoryComputeKey<E> getMemoryComputeKey()
MemoryComputing
MemoryComputeKey
that will be used by this step.getMemoryComputeKey
in interface MemoryComputing<E>
Copyright © 2013–2022 Apache Software Foundation. All rights reserved.