KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > monitor > stats > JVMThreadInfoStats


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  * Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
26  * Use is subject to license terms.
27  */

28
29 package com.sun.enterprise.admin.monitor.stats;
30 import javax.management.j2ee.statistics.Stats JavaDoc;
31 import javax.management.j2ee.statistics.CountStatistic JavaDoc;
32 import com.sun.enterprise.admin.monitor.stats.StringStatistic;
33
34 /**
35  * A Stats interface, to expose the monitoring information
36  * about each individual thread in the the thread system of the JVM.
37  * @since 8.1
38  */

39 public interface JVMThreadInfoStats extends Stats JavaDoc {
40     
41     /**
42      * Returns the Id of the thread
43      * @return CountStatistic Id of the thread
44      */

45     public CountStatistic JavaDoc getThreadId();
46     
47     /**
48      * Returns the name of the thread
49      * @return StringStatistic name of the thread
50      */

51     public StringStatistic getThreadName();
52     
53     /**
54      * Returns the state of the thread
55      * @return StringStatistic Thread state
56      */

57     public StringStatistic getThreadState();
58     
59     /**
60      * Returns the elapsed time (in milliseconds) that the thread associated
61      * with this ThreadInfo has blocked to enter or reenter a monitor since
62      * thread contention monitoring is enabled.
63      * @return CountStatistic time elapsed in milliseconds, since the thread
64      * entered the BLOCKED state. Returns -1 if thread
65      * contention monitoring is disabled
66      */

67      public CountStatistic JavaDoc getBlockedTime();
68      
69      /**
70       * Returns the number of times that this thread has been in the blocked
71       * state
72       * @return CountStatistic the total number of times that the thread
73       * entered the BLOCKED state
74       */

75      public CountStatistic JavaDoc getBlockedCount();
76      
77      /**
78       * Returns the elapsed time(in milliseconds) that the thread has been in
79       * the waiting state.
80       * @returns CountStatistic elapsed time in milliseconds that the thread has
81       * been in a WAITING state. Returns -1 if thread
82       * contention monitoring is disabled.
83       */

84      public CountStatistic JavaDoc getWaitedTime();
85      
86      /**
87       * Returns the number of times that the thread has been in WAITING or
88       * TIMED_WAITING states
89       * @return CountStatistic total number of times that the thread was in
90       * WAITING or TIMED_WAITING states
91       */

92      public CountStatistic JavaDoc getWaitedCount();
93      
94      /**
95       * Returns the string representation of the monitor lock that the thread
96       * is blocked to enter or waiting to be notified through
97       * the Object.wait method
98       * @return StringStatistic the string representation of the monitor lock
99       */

100      public StringStatistic getLockName();
101      
102      /**
103       * Returns the Id of the thread which holds the monitor lock of an
104       * object on which this thread is blocking
105       * @return CountStatistic Id of the thread holding the lock.
106       */

107      public CountStatistic JavaDoc getLockOwnerId();
108      
109      
110      /**
111       * Returns the name of the thread that holds the monitor lock of the
112       * object this thread is blocking on
113       * @return StringStatistic name of the thread holding the monitor lock.
114       */

115      public StringStatistic getLockOwnerName();
116      
117      /**
118       * Returns the stacktrace associated with this thread
119       */

120      public StringStatistic getStackTrace();
121 }
122
Popular Tags