28package com.jogamp.common.util;
30import java.io.PrintStream;
52 public void dump(PrintStream stream, String prefix);
77 public void resetFull(T[] copyFrom)
throws IllegalArgumentException;
161 public
boolean putSame(
boolean blocking) throws InterruptedException;
180 public
void growEmptyBuffer(T[] newElements) throws IllegalStateException, IllegalArgumentException;
193 public
void growFullBuffer(
int amount) throws IllegalStateException, IllegalArgumentException;
Ring buffer interface, a.k.a circular buffer.
T peekBlocking()
Peeks the next element at the read position w/o modifying pointer, but w/ blocking.
void growEmptyBuffer(T[] newElements)
Grows an empty ring buffer, increasing it's capacity about the amount.
void clear()
Resets the read and write position according to an empty ring buffer and set all ring buffer slots to...
T peek()
Peeks the next element at the read position w/o modifying pointer, nor blocking.
int size()
Returns the number of elements in this ring buffer.
boolean isFull()
Returns true if this ring buffer is full, otherwise false.
boolean isEmpty()
Returns true if this ring buffer is empty, otherwise false.
void resetFull(T[] copyFrom)
Resets the read and write position according to a full ring buffer and fill all slots w/ elements of ...
int getFreeSlots()
Returns the number of free slots available to put.
void putBlocking(T e)
Enqueues the given element.
T getBlocking()
Dequeues the oldest enqueued element.
String toString()
Returns a short string representation incl.
int capacity()
Returns the net capacity of this ring buffer.
void growFullBuffer(int amount)
Grows a full ring buffer, increasing it's capacity about the amount.
boolean putSame(boolean blocking)
Enqueues the same element at it's write position, if not full.
boolean put(T e)
Enqueues the given element.
void waitForFreeSlots(int count)
Blocks until at least count free slots become available.
void dump(PrintStream stream, String prefix)
Debug functionality - Dumps the contents of the internal array.