Interface ICacheEventQueue<K,V>
- All Known Implementing Classes:
AbstractCacheEventQueue,CacheEventQueue,PooledCacheEventQueue
public interface ICacheEventQueue<K,V>
Interface for a cache event queue. An event queue is used to propagate
ordered cache events to one and only one target listener.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a feature to the DisposeEvent attribute of the ICacheEventQueue objectvoidaddPutEvent(ICacheElement<K, V> ce) Adds a feature to the PutEvent attribute of the ICacheEventQueue objectvoidAdds a feature to the RemoveAllEvent attribute of the ICacheEventQueue objectvoidaddRemoveEvent(K key) Adds a feature to the RemoveEvent attribute of the ICacheEventQueue objectvoiddestroy()Description of the MethodlongGets the listenerId attribute of the ICacheEventQueue objectReturn the type of event queue we are using, either single or pooled.Returns the historical and statistical data for an event queue cache.booleanisEmpty()Are there elements in the queue.booleanA Queue is working unless it has reached its max failure count.intsize()Returns the number of elements in the queue.
-
Method Details
-
getQueueType
Return the type of event queue we are using, either single or pooled.- Returns:
- the queue type: single or pooled
-
addPutEvent
Adds a feature to the PutEvent attribute of the ICacheEventQueue object- Parameters:
ce- The feature to be added to the PutEvent attribute- Throws:
IOException
-
addRemoveEvent
Adds a feature to the RemoveEvent attribute of the ICacheEventQueue object- Parameters:
key- The feature to be added to the RemoveEvent attribute- Throws:
IOException
-
addRemoveAllEvent
Adds a feature to the RemoveAllEvent attribute of the ICacheEventQueue object- Throws:
IOException
-
addDisposeEvent
Adds a feature to the DisposeEvent attribute of the ICacheEventQueue object- Throws:
IOException
-
getListenerId
long getListenerId()Gets the listenerId attribute of the ICacheEventQueue object- Returns:
- The listenerId value
-
destroy
void destroy()Description of the Method -
isWorking
boolean isWorking()A Queue is working unless it has reached its max failure count.- Returns:
- boolean
-
size
int size()Returns the number of elements in the queue. If the queue cannot determine the size accurately it will return 1.- Returns:
- number of items in the queue.
-
isEmpty
boolean isEmpty()Are there elements in the queue.- Returns:
- true if there are stil elements.
-
getStatistics
Returns the historical and statistical data for an event queue cache.- Returns:
- IStats
-