org.apache.uima.aae.spi.transport.vm
public class UimaVmQueue extends java.util.concurrent.LinkedBlockingQueue<java.lang.Runnable> implements UimaVmQueueMBean
LinkedBlockingQueue
. It exposes the following queue
statistics:
Constructor and Description |
---|
UimaVmQueue() |
Modifier and Type | Method and Description |
---|---|
int |
getConsumerCount()
Returns total number of concurrent threads consuming work from this queue.
|
long |
getDequeueCount()
Returns total number of items dequeued so far
|
int |
getQueueSize()
Returns the current number of items in the queue.
|
void |
reset()
Resets both the queue size and dequeue count to zero
|
void |
setConsumerCount(int aConsumerCount)
Sets the number of concurrent threads consuming work from this queue
|
java.lang.Runnable |
take()
Override of the method in the super class to enable counting of items taken (dequeued) off the
queue.
|
clear, drainTo, drainTo, iterator, offer, offer, peek, poll, poll, put, remainingCapacity, remove, size, toArray, toArray, toString
contains, containsAll, isEmpty, removeAll, retainAll
public int getQueueSize()
getQueueSize
in interface UimaVmQueueMBean
public long getDequeueCount()
getDequeueCount
in interface UimaVmQueueMBean
public java.lang.Runnable take() throws java.lang.InterruptedException
take
in interface java.util.concurrent.BlockingQueue<java.lang.Runnable>
take
in class java.util.concurrent.LinkedBlockingQueue<java.lang.Runnable>
java.lang.InterruptedException
public int getConsumerCount()
getConsumerCount
in interface UimaVmQueueMBean
public void setConsumerCount(int aConsumerCount)
aConsumerCount
- - number of consuming threadspublic void reset()
reset
in interface UimaVmQueueMBean
Copyright © 2014. All Rights Reserved.