Package com.sun.corba.ee.impl.threadpool
Class WorkQueueImpl
java.lang.Object
com.sun.corba.ee.impl.threadpool.WorkQueueImpl
- All Implemented Interfaces:
WorkQueue
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate longprivate ThreadPoolprivate longprivate longstatic final String -
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 amount Work items have spent in the Queue waiting to be processed.getName()This method will return the name of the WorkQueue.Get the ThreadPool instance servicing this WorkQueueprivate int(package private) WorkrequestWork(long waitTime) voidsetThreadPool(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.
-
Field Details
-
WORKQUEUE_DEFAULT_NAME
- See Also:
-
queue
-
workerThreadPool
-
workItemsAdded
private long workItemsAdded -
workItemsDequeued
private long workItemsDequeued -
totalTimeInQueue
private long totalTimeInQueue -
name
-
-
Constructor Details
-
WorkQueueImpl
public WorkQueueImpl() -
WorkQueueImpl
-
WorkQueueImpl
-
-
Method Details
-
getWorkQueueSize
private int getWorkQueueSize() -
addWork
Description copied from interface:WorkQueueThis method is used to add work to the WorkQueue -
requestWork
-
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
@ManagedAttribute @Description("Total number of items added to the queue") public long totalWorkItemsAdded()Returns the total number of Work items added to the Queue.- Specified by:
totalWorkItemsAddedin interfaceWorkQueue
-
workItemsInQueue
@ManagedAttribute @Description("Total number of items in the queue to be processed") public int workItemsInQueue()Returns the total number of Work items in the Queue to be processed.- Specified by:
workItemsInQueuein interfaceWorkQueue
-
averageTimeInQueue
@ManagedAttribute @Description("Average time work items spend waiting in the queue in milliseconds") public long averageTimeInQueue()Returns the average amount Work items have spent in the Queue waiting to be processed.- Specified by:
averageTimeInQueuein interfaceWorkQueue
-
getName
Description copied from interface:WorkQueueThis method will return the name of the WorkQueue.
-