|
|
BoundedFIFO Class ReferenceInheritance diagram for BoundedFIFO:
[legend]Collaboration diagram for BoundedFIFO:
[legend]List of all members.
Detailed Description
BoundedFIFO serves as the bounded first-in-first-out buffer heavily used by the AsyncAppender.
Constructor & Destructor Documentation
|
Instantiate a new BoundedFIFO with a maximum size passed as argument. |
Member Function Documentation
|
Get the first element in the buffer. Returns null if there are no elements in the buffer. |
int getMaxSize |
( |
|
) |
const [inline] |
|
|
Get the maximum size of the buffer. |
bool isFull |
( |
|
) |
const [inline] |
|
|
Return true if the buffer is full, i.e. of the number of elements in the buffer equals the buffer size. |
int length |
( |
|
) |
const [inline] |
|
|
Get the number of elements in the buffer. This number is guaranteed to be in the range 0 to maxSize (inclusive). |
|
Place a LoggingEvent in the buffer. If the buffer is full then the event is silently dropped. It is the caller's responsability to make sure that the buffer has free space. |
void resize |
( |
int |
newSize |
) |
|
|
|
Resize the buffer to a new size. If the new size is smaller than the old size events might be lost. |
bool wasEmpty |
( |
|
) |
const [inline] |
|
|
Returns true if there is just one element in the buffer. In other words, if there were no elements before the last put operation completed. |
bool wasFull |
( |
|
) |
const [inline] |
|
|
Returns true if the number of elements in the buffer plus 1 equals the maximum buffer size, returns false otherwise. |
The documentation for this class was generated from the following files:
- boundedfifo.h
- boundedfifo.cpp
|
|
Copyright © 1999-2004, Apache Software Foundation
|