|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jcs.engine.CacheEventQueue
An event queue is used to propagate ordered cache events to one and only one target listener.
Nested Class Summary | |
private class |
CacheEventQueue.AbstractCacheEvent
Retries before declaring failure. |
private class |
CacheEventQueue.DisposeEvent
Description of the Class |
private static class |
CacheEventQueue.Node
|
private class |
CacheEventQueue.PutEvent
|
private class |
CacheEventQueue.QProcessor
|
private class |
CacheEventQueue.RemoveAllEvent
Description of the Class |
private class |
CacheEventQueue.RemoveEvent
Description of the Class |
Field Summary | |
private java.lang.String |
cacheName
|
private boolean |
destroyed
|
private int |
failureCount
|
private CacheEventQueue.Node |
head
|
private ICacheListener |
listener
|
private byte |
listenerId
|
private static org.apache.commons.logging.Log |
log
|
private int |
maxFailure
|
private static int |
processorInstanceCount
|
private java.lang.Object |
queueLock
|
private java.lang.Thread |
t
|
private CacheEventQueue.Node |
tail
|
private int |
waitBeforeRetry
|
Constructor Summary | |
CacheEventQueue(ICacheListener listener,
byte listenerId,
java.lang.String cacheName)
Constructs with the specified listener and the cache name. |
|
CacheEventQueue(ICacheListener listener,
byte listenerId,
java.lang.String cacheName,
int maxFailure,
int waitBeforeRetry)
Constructor for the CacheEventQueue object |
Method Summary | |
void |
addDisposeEvent()
Adds a feature to the DisposeEvent attribute of the ICacheEventQueue object |
void |
addPutEvent(ICacheElement ce)
Adds a feature to the PutEvent attribute of the ICacheEventQueue object |
void |
addRemoveAllEvent()
Adds a feature to the RemoveAllEvent attribute of the ICacheEventQueue object |
void |
addRemoveEvent(java.io.Serializable key)
Adds a feature to the RemoveEvent attribute of the ICacheEventQueue object |
void |
destroy()
Event Q is emtpy. |
byte |
getListenerId()
Gets the listenerId attribute of the ICacheEventQueue object |
boolean |
isAlive()
Gets the alive attribute of the ICacheEventQueue object |
private void |
put(CacheEventQueue.AbstractCacheEvent event)
Adds an event to the queue. |
private CacheEventQueue.AbstractCacheEvent |
take()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final org.apache.commons.logging.Log log
private static int processorInstanceCount
private ICacheListener listener
private byte listenerId
private java.lang.String cacheName
private int failureCount
private int maxFailure
private int waitBeforeRetry
private boolean destroyed
private java.lang.Thread t
private java.lang.Object queueLock
private CacheEventQueue.Node head
private CacheEventQueue.Node tail
Constructor Detail |
public CacheEventQueue(ICacheListener listener, byte listenerId, java.lang.String cacheName)
listener
- listenerId
- cacheName
- public CacheEventQueue(ICacheListener listener, byte listenerId, java.lang.String cacheName, int maxFailure, int waitBeforeRetry)
listener
- listenerId
- cacheName
- maxFailure
- waitBeforeRetry
- Method Detail |
public void destroy()
destroy
in interface ICacheEventQueue
public java.lang.String toString()
public boolean isAlive()
ICacheEventQueue
isAlive
in interface ICacheEventQueue
public byte getListenerId()
ICacheEventQueue
getListenerId
in interface ICacheEventQueue
public void addPutEvent(ICacheElement ce) throws java.io.IOException
ICacheEventQueue
addPutEvent
in interface ICacheEventQueue
ce
- The feature to be added to the PutEvent attribute
java.io.IOException
public void addRemoveEvent(java.io.Serializable key) throws java.io.IOException
ICacheEventQueue
addRemoveEvent
in interface ICacheEventQueue
key
- The feature to be added to the RemoveEvent attribute
java.io.IOException
public void addRemoveAllEvent() throws java.io.IOException
ICacheEventQueue
addRemoveAllEvent
in interface ICacheEventQueue
java.io.IOException
public void addDisposeEvent() throws java.io.IOException
ICacheEventQueue
addDisposeEvent
in interface ICacheEventQueue
java.io.IOException
private void put(CacheEventQueue.AbstractCacheEvent event)
event
- private CacheEventQueue.AbstractCacheEvent take() throws java.lang.InterruptedException
java.lang.InterruptedException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |