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 TypeMethodDescriptionvoid
Adds a feature to the DisposeEvent attribute of the ICacheEventQueue objectvoid
addPutEvent
(ICacheElement<K, V> ce) Adds a feature to the PutEvent attribute of the ICacheEventQueue objectvoid
Adds a feature to the RemoveAllEvent attribute of the ICacheEventQueue objectvoid
addRemoveEvent
(K key) Adds a feature to the RemoveEvent attribute of the ICacheEventQueue objectvoid
destroy()
Description of the Methodlong
Gets 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.boolean
isEmpty()
Are there elements in the queue.boolean
A Queue is working unless it has reached its max failure count.int
size()
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
-