|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jcs.engine.control.event.ElementEventQueue
public class ElementEventQueue
An event queue is used to propagate ordered cache events to one and only one target listener.
| Nested Class Summary | |
|---|---|
protected class |
ElementEventQueue.AbstractElementEventRunner
Retries before declaring failure. |
protected static class |
ElementEventQueue.Node
A node in the queue. |
| Field Summary | |
|---|---|
protected String |
cacheName
The cache (region) name. |
protected static org.apache.commons.logging.Log |
log
The logger |
protected Object |
queueLock
Internal queue implementation |
| Constructor Summary | |
|---|---|
ElementEventQueue(String cacheName)
Constructor for the ElementEventQueue object |
|
| Method Summary | |
|---|---|
void |
addElementEvent(IElementEventHandler hand,
IElementEvent event)
Adds an ElementEvent to be handled |
void |
destroy()
Event Q is empty. |
int |
getWaitToDieMillis()
Returns the time to wait for events before killing the background thread. |
boolean |
isAlive()
Gets the alive attribute of the IElementEventQueue object |
void |
setWaitToDieMillis(int wtdm)
Sets the time to wait for events before killing the background thread. |
int |
size()
Returns the number of elements in the queue. |
void |
stopProcessing()
Kill the processor thread and indicate that the queue is destroyed and no longer alive, but it can still be working. |
protected ElementEventQueue.AbstractElementEventRunner |
take()
Returns the next item on the queue, or waits if empty. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log log
protected final String cacheName
protected final Object queueLock
| Constructor Detail |
|---|
public ElementEventQueue(String cacheName)
cacheName - | Method Detail |
|---|
public void destroy()
destroy in interface IElementEventQueuepublic void stopProcessing()
public int getWaitToDieMillis()
public void setWaitToDieMillis(int wtdm)
wtdm - the ms for the q to sit idle.public String toString()
toString in class Objectpublic int size()
public boolean isAlive()
IElementEventQueue
isAlive in interface IElementEventQueue
public void addElementEvent(IElementEventHandler hand,
IElementEvent event)
throws IOException
addElementEvent in interface IElementEventQueuehand - The IElementEventHandlerevent - The IElementEventHandler IElementEvent event
IOExceptionprotected ElementEventQueue.AbstractElementEventRunner take()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||