KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > spi > orbutil > threadpool > WorkQueue


1 /*
2  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
3  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4  */

5
6 package com.sun.corba.se.spi.orbutil.threadpool;
7
8 public interface WorkQueue
9 {
10
11     /**
12     * This method is used to add work to the WorkQueue
13     */

14     public void addWork(Work aWorkItem);
15
16     /**
17     * This method will return the name of the WorkQueue.
18     */

19     public String JavaDoc getName();
20
21     /**
22     * Returns the total number of Work items added to the Queue.
23     */

24     public long totalWorkItemsAdded();
25
26     /**
27     * Returns the total number of Work items in the Queue to be processed.
28     */

29     public int workItemsInQueue();
30
31     /**
32     * Returns the average time a work item is waiting in the queue before
33     * getting processed.
34     */

35     public long averageTimeInQueue();
36
37     /**
38      * Set the ThreadPool instance servicing this WorkQueue
39      */

40     public void setThreadPool(ThreadPool aThreadPool);
41
42     /**
43      * Get the ThreadPool instance servicing this WorkQueue
44      */

45     public ThreadPool getThreadPool();
46 }
47
48 // End of file.
49
Popular Tags