| Constructor and Description |
|---|
WorkQueueImpl() |
WorkQueueImpl(ThreadPool workerThreadPool) |
WorkQueueImpl(ThreadPool workerThreadPool,
String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addWork(Work work)
This method is used to add work to the WorkQueue
|
long |
averageTimeInQueue()
Returns the average time a work item is waiting in the queue before
getting processed.
|
String |
getName()
This method will return the name of the WorkQueue.
|
ThreadPool |
getThreadPool()
Get the ThreadPool instance servicing this WorkQueue
|
void |
setThreadPool(ThreadPool workerThreadPool)
Set the ThreadPool instance servicing this WorkQueue
|
long |
totalWorkItemsAdded()
Returns the total number of Work items added to the Queue.
|
int |
workItemsInQueue()
Returns the total number of Work items in the Queue to be processed
This method is unsynchronized and only gives a snapshot of the
state when it is called
|
public WorkQueueImpl()
public WorkQueueImpl(ThreadPool workerThreadPool)
public WorkQueueImpl(ThreadPool workerThreadPool, String name)
public void addWork(Work work)
WorkQueuepublic void setThreadPool(ThreadPool workerThreadPool)
WorkQueuesetThreadPool in interface WorkQueuepublic ThreadPool getThreadPool()
WorkQueuegetThreadPool in interface WorkQueuepublic long totalWorkItemsAdded()
totalWorkItemsAdded in interface WorkQueuepublic int workItemsInQueue()
workItemsInQueue in interface WorkQueuepublic long averageTimeInQueue()
WorkQueueaverageTimeInQueue in interface WorkQueueCopyright © 2018 JBoss by Red Hat. All rights reserved.