Class Buffer<T extends Comparable>

java.lang.Object
io.nosqlbench.engine.api.activityapi.cyclelog.buffers.Buffer<T>
Type Parameters:
T - The type held in this buffer
Direct Known Subclasses:
StrideTracker

public abstract class Buffer<T extends Comparable> extends Object
This is a lightweight buffer implementation that allows for buffer flipping and callbacks when the buffer is full.
  • Field Details

  • Constructor Details

    • Buffer

      public Buffer(int size)
  • Method Details

    • onFull

      protected void onFull()
    • compare

      protected abstract int compare(T one, T other)
    • remaining

      public int remaining()
    • put

      public Buffer<T> put(T element)
    • getFlippedData

      public List<T> getFlippedData()
    • toString

      public String toString()
      Overrides:
      toString in class Object