Class BlockingSegmentInput

java.lang.Object
io.nosqlbench.engine.core.fortesting.BlockingSegmentInput
All Implemented Interfaces:
Input

public class BlockingSegmentInput extends Object implements Input
This cycle value supplier blocks the caller, only letting it complete for each value that is set from the controlling producer. This is just for testing. The convenience notify methods are to make tests more obvious.
  • Constructor Details

    • BlockingSegmentInput

      public BlockingSegmentInput()
  • Method Details

    • getInputSegment

      public CycleSegment getInputSegment(int segmentLength)
      Description copied from interface: Input
      Return the next InputSegment available, or null if none were available. This method is required to be thread safe.

      All implementations of this method are required to be thread-safe.

      Specified by:
      getInputSegment in interface Input
      Parameters:
      segmentLength - The number of cycles (not necessarily contiguous) in the segment.
      Returns:
      a segment, or null if none available.
    • publishSegment

      public void publishSegment(long... cycleValues)
    • toString

      public String toString()
      Overrides:
      toString in class Object