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 String
private long
private ThreadPool
private long
private long
static final String
-
Constructor Summary
ConstructorsConstructorDescriptionWorkQueueImpl
(ThreadPool workerThreadPool) WorkQueueImpl
(ThreadPool workerThreadPool, String name) -
Method Summary
Modifier and TypeMethodDescriptionvoid
This method is used to add work to the WorkQueuelong
Returns 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) Work
requestWork
(long waitTime) void
setThreadPool
(ThreadPool workerThreadPool) Set the ThreadPool instance servicing this WorkQueuelong
Returns the total number of Work items added to the Queue.int
Returns 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:WorkQueue
This method is used to add work to the WorkQueue -
requestWork
-
setThreadPool
Description copied from interface:WorkQueue
Set the ThreadPool instance servicing this WorkQueue- Specified by:
setThreadPool
in interfaceWorkQueue
-
getThreadPool
Description copied from interface:WorkQueue
Get the ThreadPool instance servicing this WorkQueue- Specified by:
getThreadPool
in 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:
totalWorkItemsAdded
in 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:
workItemsInQueue
in 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:
averageTimeInQueue
in interfaceWorkQueue
-
getName
Description copied from interface:WorkQueue
This method will return the name of the WorkQueue.
-