KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > resource > MonitorableResourcePool


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 package com.sun.enterprise.resource;
25
26 /**
27  * An interface that adds 8.1 monitoring capabilities to the ResourcePool
28  * interface
29  * @author Sivakumar Thyagarajan
30  * @since 8.1
31  */

32 public interface MonitorableResourcePool extends ResourcePool {
33     
34     /**
35      * Return the number of threads that are waiting
36      * to obtain a connection from the pool
37      */

38     public int getNumThreadWaiting();
39     
40     /**
41      * Return the number of connections that have failed validation
42      */

43     public long getNumConnFailedValidation();
44     
45     /**
46      * Return the number of threads that have time out after
47      * waiting to obtain a connection from the pool.
48      */

49     public long getNumConnTimedOut();
50     
51     /**
52      * Return the number of free connections in the pool
53      */

54     public long getNumConnFree();
55     public long getMaxNumConnFree();
56     public long getMinNumConnFree();
57     
58     /**
59      * Return the number of connections in use
60      */

61     public long getNumConnInUse();
62     public long getMinNumConnUsed();
63     
64     /**
65      * Return the maximum number of connections ever used in
66      * this pool
67      */

68     public long getMaxNumConnUsed();
69     
70     //8.1 pool monitoring statistics
71
public long getCurrentConnRequestWaitTime();
72     public long getMaxConnRequestWaitTime();
73     public long getMinConnRequestWaitTime();
74     public long getTotalConnectionRequestWaitTime();
75     
76     
77     public long getNumConnCreated();
78     public long getNumConnDestroyed();
79     
80     public long getNumConnAcquired();
81     public long getNumConnReleased();
82     
83     public long getNumConnSuccessfullyMatched();
84     public long getNumConnNotSuccessfullyMatched();
85 }
86
Popular Tags