KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > appserv > management > monitor > statistics > ThreadPoolStats


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /*
25  * $Id: ThreadPoolStats.java,v 1.3 2005/12/25 03:51:16 tcfujii Exp $
26  * $Date: 2005/12/25 03:51:16 $
27  * $Revision: 1.3 $
28  */

29
30 package com.sun.appserv.management.monitor.statistics;
31 import javax.management.j2ee.statistics.Stats JavaDoc;
32 import javax.management.j2ee.statistics.CountStatistic JavaDoc;
33 import javax.management.j2ee.statistics.BoundedRangeStatistic JavaDoc;
34 import javax.management.j2ee.statistics.RangeStatistic JavaDoc;
35
36 /**
37     Stats interface for the monitorable attributes of a generic thread pool.
38  
39  @see com.sun.appserv.management.monitor.ThreadPoolMonitor
40  */

41
42 public interface ThreadPoolStats extends Stats JavaDoc {
43     
44     /** Returns the statistical information about the number of Threads in the associated ThreaPool, as an instance of BoundedRangeStatistic.
45      * This returned value gives an idea about how the pool is changing.
46      * @return an instance of {@link BoundedRangeStatistic}
47      */

48     public BoundedRangeStatistic JavaDoc getCurrentNumberOfThreads();
49     
50     /** Returns the total number of available threads, as an instance of {@link CountStatistic}.
51      * @return an instance of {@link CountStatistic}
52      */

53     public CountStatistic JavaDoc getNumberOfAvailableThreads();
54     
55     /** Returns the number of busy threads, as an instance of {@link CountStatistic}.
56      * @return an instance of {@link CountStatistic}
57      */

58     public CountStatistic JavaDoc getNumberOfBusyThreads();
59     
60     /**
61      * Returns the statistical information about the average completion time of a work item in milliseconds.
62      * @return an instance of {@link RangeStatistic}
63      */

64     public RangeStatistic JavaDoc getAverageWorkCompletionTime();
65     
66     /** Returns the the total number of work items added so far to the work queue associated with threadpool.
67      * @return an instance of {@link CountStatistic}
68      */

69     public CountStatistic JavaDoc getTotalWorkItemsAdded();
70     
71     /**
72      * Returns average time in milliseconds a work item waited in the work queue before getting processed.
73      * @return an instance of {@link RangeStatistic}
74      */

75     public RangeStatistic JavaDoc getAverageTimeInQueue();
76 }
77
Popular Tags