public interface IQueue extends IControllable, ICountable
Modifier and Type | Method and Description |
---|---|
Object |
dequeue()
Retrieve the next Object from this queue.
|
Object |
dequeue(long waitTime)
Retrieve the next Object from this queue, with timeout value.
|
void |
enqueue(Object object)
Place an object into this queue.
|
long |
getAverageTimeInQueue() |
long |
getDequeueAverage() |
long |
getDequeueRequests() |
long |
getEnqueueAverage() |
long |
getEnqueueRequests() |
Object |
getNotifier() |
boolean |
isEmpty() |
void |
resetAverages()
Reset the counters that measure averages.
|
void |
setBlocking(boolean blocking)
Changes whether or not the queue should block on dequeues.
|
int |
size()
Get the number of items in the queue.
|
drain, isPaused, isRunning, pause, resume, shutdown
addCounter, getCounter, getCounters, resetCounters
void enqueue(Object object)
object
- action to add to queueQueueException
- if the queue is not operationalObject dequeue()
Note: If the queue has been set to blocking mode, the method should
not normally return until there is data available. If the 'wait' was interrupted
for some reason, this method may return null
even in blocking mode.
Please check for this condition.
null
if no data is availableQueueException
- if the queue is not operationalObject dequeue(long waitTime)
null
if no data is availableQueueException
- if the queue is not operationalvoid setBlocking(boolean blocking)
Default behavior is non-blocking.
blocking
- 'true' if the queue should blockint size()
QueueException
- if the queue is not operationalboolean isEmpty()
long getEnqueueRequests()
long getDequeueRequests()
long getEnqueueAverage()
long getDequeueAverage()
long getAverageTimeInQueue()
void resetAverages()
Object getNotifier()
© Copyright IBM Corp. 2013. All rights reserved.