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)
WorkQueue
public void setThreadPool(ThreadPool workerThreadPool)
WorkQueue
setThreadPool
in interface WorkQueue
public ThreadPool getThreadPool()
WorkQueue
getThreadPool
in interface WorkQueue
public long totalWorkItemsAdded()
totalWorkItemsAdded
in interface WorkQueue
public int workItemsInQueue()
workItemsInQueue
in interface WorkQueue
public long averageTimeInQueue()
WorkQueue
averageTimeInQueue
in interface WorkQueue
Copyright © 2019 JBoss by Red Hat. All rights reserved.