KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > monitor > stats > 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  * Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
26  * Use is subject to license terms.
27  */

28
29 /*
30  * $Id: ConnectionPoolStats.java,v 1.2 2005/12/25 03:52:11 tcfujii Exp $
31  * $Date: 2005/12/25 03:52:11 $
32  * $Revision: 1.2 $
33  *
34  */

35
36 package com.sun.enterprise.admin.monitor.stats;
37 import javax.management.j2ee.statistics.Stats JavaDoc;
38 import javax.management.j2ee.statistics.RangeStatistic JavaDoc;
39 import javax.management.j2ee.statistics.CountStatistic JavaDoc;
40
41 /**
42  * A Stats interface to represent the statistical data exposed by a Connection
43  * Pool. All the Connection Pool implementations should expose statistical data
44  * by implementing this interface.
45  */

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

56     public RangeStatistic JavaDoc getNumConnUsed();
57     
58     /*
59      * represents the number of free connections in the pool.
60      * @return CountStatistic
61      */

62     //public CountStatistic getNumConnFree() ;
63

64     /**
65      * represents the number of connections that failed validation
66      * @return CountStatistic
67      */

68     public CountStatistic JavaDoc getNumConnFailedValidation() ;
69    
70     /**
71      * represents the number of connection requests that timed out
72      * @return CountStatistic
73      */

74     public CountStatistic JavaDoc getNumConnTimedOut();
75     
76     /**
77      * Indicates the number of free connections in the pool in addition
78      * to their high and low watermarks.
79      * @return RangeStatistic
80      */

81      public RangeStatistic JavaDoc getNumConnFree();
82      
83     
84     /**
85      * Indicates the average wait time of connections, for successful
86      * connection request attempts to the connector connection pool
87      * @return CountStatistic
88      */

89     public CountStatistic JavaDoc getAverageConnWaitTime();
90     
91     /**
92      * Indicates the number of connection requests in the queue waiting
93      * to be serviced
94      * @return CountStatistic
95      */

96     public CountStatistic JavaDoc getWaitQueueLength();
97     
98     /**
99      * Indicates the longest, shortest wait times of connection
100      * requests. The current value indicates the wait time of
101      * the last request that was serviced by the pool.
102      * @return RangeStatistic
103      */

104     public RangeStatistic JavaDoc getConnRequestWaitTime();
105     
106     /**
107      * indicates the number of physical EIS/JDBC connections that were created,
108      * since the last reset
109      * @return CountStatistic
110      */

111     public CountStatistic JavaDoc getNumConnCreated();
112     
113     /**
114      * indicates the number of physical EIS/JDBC connections that were destroyed
115      * , since the last reset
116      * @return CountStatistic
117      */

118     public CountStatistic JavaDoc getNumConnDestroyed();
119
120     /**
121      * indicates the number of logical EIS/JDBC connections that were acquired
122      * from the pool, since the last reset
123      * @return CountStatistic
124      * @since 8.1
125      */

126     public CountStatistic JavaDoc getNumConnAcquired();
127     
128     /**
129      * indicates the number of logical EIS/JDBC connections that were released
130      * to the pool, since the last reset
131      * @return CountStatistic
132      * @since 8.1
133      */

134     public CountStatistic JavaDoc getNumConnReleased();
135
136     /**
137      * Indicates the number of connections that were successfully matched by
138      * the Managed Connection Factory.
139      *
140      * @return CountStatistic
141      * @since 9.0
142      */

143     public CountStatistic JavaDoc getNumConnSuccessfullyMatched();
144  
145     /**
146      * Indicates the number of connections that were rejected by the
147      * Managed Connection Factory during matching.
148      *
149      * @return CountStatistic
150      * @since 9.0
151      */

152     public CountStatistic JavaDoc getNumConnNotSuccessfullyMatched();
153 }
154
Popular Tags