KickJava   Java API By Example, From Geeks To Geeks.

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


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: ConnectionPoolStats.java,v 1.5 2006/03/23 23:14:39 llc Exp $
26  * $Date: 2006/03/23 23:14:39 $
27  * $Revision: 1.5 $
28  */

29
30 package com.sun.appserv.management.monitor.statistics;
31 import javax.management.j2ee.statistics.Stats JavaDoc;
32 import javax.management.j2ee.statistics.RangeStatistic JavaDoc;
33 import javax.management.j2ee.statistics.CountStatistic JavaDoc;
34
35 /**
36  * A Stats interface to represent the statistical data exposed by a Connection
37  * Pool. All the Connection Pool implementations should expose statistical data
38  * by implementing this interface.
39  */

40
41 public interface ConnectionPoolStats extends Stats JavaDoc
42 {
43     
44     /**
45      * Statistic to represent the Connection Usage
46      * In addition to information about the number of connections being
47      * used currently, this also contains information about the
48      * Maximum number of connections that were used(High Watermark)
49      * @return RangeStatistic
50      */

51     public RangeStatistic JavaDoc getNumConnUsed();
52     
53     /*
54      * represents the number of free connections in the pool.
55      * @return CountStatistic
56      */

57     public RangeStatistic JavaDoc getNumConnFree() ;
58     
59     /**
60      * represents the number of connections that failed validation
61      * @return CountStatistic
62      */

63     public CountStatistic JavaDoc getNumConnFailedValidation() ;
64    
65     /**
66      * represents the number of connection requests that timed out
67      * @return CountStatistic
68      */

69     public CountStatistic JavaDoc getNumConnTimedOut();
70     
71     /**
72      * Indicates the average wait time of connections, before they are
73      * serviced by the connector connection pool
74      * @return CountStatistic
75      */

76     public CountStatistic JavaDoc getAverageConnWaitTime();
77     
78     /**
79      * Indicates the number of connection requests in the queue waiting
80      * to be serviced
81      * @return CountStatistic
82      */

83     public CountStatistic JavaDoc getWaitQueueLength();
84     
85     /**
86      * Indicates the longest, shortest wait times of connection
87      * requests. The current value indicates the wait time of
88      * the last request that was serviced by the pool.
89      * @return RangeStatistic
90      */

91     public RangeStatistic JavaDoc getConnRequestWaitTime();
92     
93     /**
94      * indicates the number of connections that were created, since
95      * the last reset
96      * @return CountStatistic
97      */

98     public CountStatistic JavaDoc getNumConnCreated();
99     
100     /**
101      * indicates the number of connections that were destroyed, since
102      * the last reset
103      * @return CountStatistic
104      */

105     public CountStatistic JavaDoc getNumConnDestroyed();
106     
107     public CountStatistic JavaDoc getNumConnAcquired();
108     public CountStatistic JavaDoc getNumConnReleased();
109
110     /**
111      * Indicates the number of connections that were successfully matched by
112      * the Managed Connection Factory.
113      *
114      * @return CountStatistic
115      * @since 9.0
116      */

117     public CountStatistic JavaDoc getNumConnSuccessfullyMatched();
118  
119     /**
120      * Indicates the number of connections that were rejected by the
121      * Managed Connection Factory during matching.
122      *
123      * @return CountStatistic
124      * @since 9.0
125      */

126     public CountStatistic JavaDoc getNumConnNotSuccessfullyMatched();
127 }
128
Popular Tags