- All Superinterfaces:
- All Known Subinterfaces:
- All Known Implementing Classes:
public interface Barrier<B> extends MemoryComputing<B>A Barrier is any step that requires all left traversers to be processed prior to emitting result traversers to the right. Note that some barrier steps may be "lazy" in that if their algorithm permits, they can emit right traversers prior to all traversers being aggregated. A barrier is the means by which a distributed step in
TraversalVertexProgramis synchronized and made to behave a single step. All Barrier steps implement
MemoryComputingas that is how barriers communicate with one another in
- Marko A. Rodriguez (http://markorodriguez.com)
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description
addBarrier(B barrier)Add a barrier to the step.
done()A way to hard set that the barrier is complete.
hasNextBarrier()Whether or not the step has an accessible barrier.
nextBarrier()Get the next barrier within this step.
processAllStarts()Process all left traversers by do not yield the resultant output.
void processAllStarts()Process all left traversers by do not yield the resultant output. This method is useful for steps like
ReducingBarrierStep, where traversers can be processed "on the fly" and thus, reduce memory consumption.
boolean hasNextBarrier()Whether or not the step has an accessible barrier.
- whether a barrier exists or not
B nextBarrier() throws NoSuchElementExceptionGet the next barrier within this step. Barriers from parallel steps can be the be merged to create a single step with merge barriers.
- the next barrier of the step
void addBarrier(B barrier)Add a barrier to the step. This typically happens when multiple parallel barriers need to become one barrier at a single step.
barrier- the barrier to merge in
default void done()A way to hard set that the barrier is complete. This is necessary when parallel barriers don't all have barriers and need hard resetting. The default implementation does nothing.