Class ReorderingConcurrentResultBuffer
java.lang.Object
io.nosqlbench.engine.api.activityapi.cyclelog.outputs.ReorderingConcurrentResultBuffer
- All Implemented Interfaces:
CanFilterResultValue,Output,AutoCloseable
public class ReorderingConcurrentResultBuffer
extends Object
implements Output, CanFilterResultValue
This will implement a result buffer that puts cycles in order when possible,
according to a sliding window.
-
Constructor Summary
ConstructorsConstructorDescriptionReorderingConcurrentResultBuffer(Output downstream) ReorderingConcurrentResultBuffer(Output downstream, int threshold) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanonCycleResult(long completedCycle, int result) Mark the result of the numbered cycle with an integer value.voidonCycleResultSegment(CycleResultsSegment segment) voidsetFilter(Predicate<ResultReadable> filter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.nosqlbench.engine.api.activityapi.output.Output
onCycleResult
-
Constructor Details
-
ReorderingConcurrentResultBuffer
-
ReorderingConcurrentResultBuffer
-
-
Method Details
-
onCycleResult
public boolean onCycleResult(long completedCycle, int result) Description copied from interface:OutputMark the result of the numbered cycle with an integer value. The meaning of the value provided is contextual to the way it is used. (Each process will have its own status tables, etc.)- Specified by:
onCycleResultin interfaceOutput- Parameters:
completedCycle- The cycle number being marked.result- the result ordinal- Returns:
- true on success, false if the marking should be retried differently
-
onCycleResultSegment
- Specified by:
onCycleResultSegmentin interfaceOutput
-
close
-
setFilter
- Specified by:
setFilterin interfaceCanFilterResultValue
-