java.lang.Object | |
↳ | org.apache.log4j.helpers.BoundedFIFO |
BoundedFIFO
serves as the bounded first-in-first-out
buffer heavily used by the AsyncAppender
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Instantiate a new BoundedFIFO with a maximum size passed as argument.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get the first element in the buffer.
| |||||||||||
Get the maximum size of the buffer.
| |||||||||||
Return
true if the buffer is full, that is, whether
the number of elements in the buffer equals the buffer size. | |||||||||||
Get the number of elements in the buffer.
| |||||||||||
Place a
LoggingEvent in the buffer. | |||||||||||
Resize the buffer to a new size.
| |||||||||||
Returns
true if there is just one element in the
buffer. | |||||||||||
Returns
true if the number of elements in the
buffer plus 1 equals the maximum buffer size, returns
false otherwise. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Instantiate a new BoundedFIFO with a maximum size passed as argument.
Get the first element in the buffer. Returns null
if
there are no elements in the buffer.
Get the maximum size of the buffer.
Return true
if the buffer is full, that is, whether
the number of elements in the buffer equals the buffer size.
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.
Resize the buffer to a new size. If the new size is smaller than the old size events might be lost.
Returns true
if there is just one element in the
buffer. In other words, if there were no elements before the last
put(LoggingEvent)
operation completed.
Returns true
if the number of elements in the
buffer plus 1 equals the maximum buffer size, returns
false
otherwise.