Class WorkQueueImpl
java.lang.Object
com.sun.corba.se.impl.orbutil.threadpool.WorkQueueImpl
- All Implemented Interfaces:
WorkQueue
-
Constructor Summary
ConstructorsConstructorDescriptionWorkQueueImpl(ThreadPool workerThreadPool) WorkQueueImpl(ThreadPool workerThreadPool, String name) -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method is used to add work to the WorkQueuelongReturns the average time a work item is waiting in the queue before getting processed.getName()This method will return the name of the WorkQueue.Get the ThreadPool instance servicing this WorkQueuevoidsetThreadPool(ThreadPool workerThreadPool) Set the ThreadPool instance servicing this WorkQueuelongReturns the total number of Work items added to the Queue.intReturns 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
-
Constructor Details
-
WorkQueueImpl
public WorkQueueImpl() -
WorkQueueImpl
-
WorkQueueImpl
-
-
Method Details
-
addWork
Description copied from interface:WorkQueueThis method is used to add work to the WorkQueue -
setThreadPool
Description copied from interface:WorkQueueSet the ThreadPool instance servicing this WorkQueue- Specified by:
setThreadPoolin interfaceWorkQueue
-
getThreadPool
Description copied from interface:WorkQueueGet the ThreadPool instance servicing this WorkQueue- Specified by:
getThreadPoolin interfaceWorkQueue
-
totalWorkItemsAdded
public long totalWorkItemsAdded()Returns the total number of Work items added to the Queue. This method is unsynchronized and only gives a snapshot of the state when it is called- Specified by:
totalWorkItemsAddedin interfaceWorkQueue
-
workItemsInQueue
public 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- Specified by:
workItemsInQueuein interfaceWorkQueue
-
averageTimeInQueue
public long averageTimeInQueue()Description copied from interface:WorkQueueReturns the average time a work item is waiting in the queue before getting processed.- Specified by:
averageTimeInQueuein interfaceWorkQueue
-
getName
Description copied from interface:WorkQueueThis method will return the name of the WorkQueue.
-