Package org.apache.druid.utils
Class CircularBuffer<E>
java.lang.Object
org.apache.druid.utils.CircularBuffer<E>
- Type Parameters:
E- Type of object to be stored in the buffer
A circular buffer that supports random bidirectional access.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CircularBuffer
public CircularBuffer(int capacity)
-
-
Method Details
-
getBuffer
-
add
-
getLatest
Access object at a given index, starting from the latest entry added and moving backwards. -
get
Access object at a given index, starting from the earliest entry added and moving forward. -
size
public int size()
-