|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibspan.log4jade.common.AgentEventsBuffer
public class AgentEventsBuffer
Events buffer implemented as FIFO queue.
Constructor Summary | |
---|---|
AgentEventsBuffer(int maxSize,
AgentContext context)
Instantiate a new AgentEventsBuffer of at most maxSize
events. |
Method Summary | |
---|---|
void |
add(LoggingEvent event)
Add an event as the last event in the buffer. |
LoggingEvent |
get()
Get the oldest (first) element in the buffer. |
LoggingEvent |
get(int i)
Get the ith oldest event currently in the buffer. |
AgentContext |
getContext()
|
int |
getMaxSize()
|
boolean |
isEmpty()
|
boolean |
isFull()
|
int |
length()
Get the number of elements in the buffer. |
void |
resize(int newSize)
Resize the cyclic buffer to newSize . |
void |
setContext(AgentContext context)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AgentEventsBuffer(int maxSize, AgentContext context) throws IllegalArgumentException
maxSize
events.
The maxSize
argument must a positive integer.
maxSize
- The maximum number of elements in the buffer.
IllegalArgumentException
Method Detail |
---|
public AgentContext getContext()
public void setContext(AgentContext context)
public boolean isFull()
public boolean isEmpty()
public void add(LoggingEvent event)
event
as the last event in the buffer.
public LoggingEvent get(int i)
null
is returned.
public int getMaxSize()
public LoggingEvent get()
public int length()
maxSize
(inclusive).
public void resize(int newSize)
newSize
.
IllegalArgumentException
- if newSize
is negative.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |