public class UimaVmQueue extends LinkedBlockingQueue<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
|
Runnable |
take()
Override of the method in the super class to enable counting of items taken (dequeued) off the
queue.
|
clear, contains, drainTo, drainTo, iterator, offer, offer, peek, poll, poll, put, remainingCapacity, remove, size, spliterator, toArray, toArray, toString
add, addAll, element, remove
containsAll, isEmpty, removeAll, retainAll
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add
addAll, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, stream
public int getQueueSize()
getQueueSize
in interface UimaVmQueueMBean
public long getDequeueCount()
getDequeueCount
in interface UimaVmQueueMBean
public Runnable take() throws InterruptedException
take
in interface BlockingQueue<Runnable>
take
in class LinkedBlockingQueue<Runnable>
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 © 2016. All rights reserved.