java.lang.Object
org.apache.skywalking.oap.server.library.datacarrier.buffer.Buffer<T>
All Implemented Interfaces:
QueueBuffer<T>

public class Buffer<T> extends Object implements QueueBuffer<T>
Self implementation ring queue.
  • Method Details

    • setStrategy

      public void setStrategy(BufferStrategy strategy)
      Description copied from interface: QueueBuffer
      Set different strategy when queue is full.
      Specified by:
      setStrategy in interface QueueBuffer<T>
    • save

      public boolean save(T data)
      Description copied from interface: QueueBuffer
      Save data into the queue;
      Specified by:
      save in interface QueueBuffer<T>
      Parameters:
      data - to add.
      Returns:
      true if saved
    • getBufferSize

      public int getBufferSize()
      Specified by:
      getBufferSize in interface QueueBuffer<T>
    • obtain

      public void obtain(List<T> consumeList)
      Description copied from interface: QueueBuffer
      Obtain the existing data from the queue
      Specified by:
      obtain in interface QueueBuffer<T>