CyclicBuffer is used by other appenders to hold instances of LoggingEvent for immediate or deferred display.
More...
List of all members.
Detailed Description
CyclicBuffer is used by other appenders to hold instances of LoggingEvent for immediate or deferred display.
This buffer gives read access to any element in the buffer not just the first or last element.
Constructor & Destructor Documentation
Instantiate a new CyclicBuffer of at most maxSize
events.
The maxSize
argument must a positive integer.
- Parameters:
-
maxSize | The maximum number of elements in the buffer. |
- Exceptions:
-
Member Function Documentation
Add an event
as the last event in the buffer.
Get the ith oldest event currently in the buffer.
If i is outside the range 0 to the number of elements currently in the buffer, then null
is returned.
Get the oldest (first) element in the buffer.
The oldest element is removed from the buffer.
Get the number of elements in the buffer.
This number is guaranteed to be in the range 0 to maxSize
(inclusive).
void resize |
( |
int |
newSize | ) |
|
Resize the cyclic buffer to newSize
.
- Exceptions:
-
The documentation for this class was generated from the following file: