KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > logicalcobwebs > proxool > admin > SnapshotIF


1 /*
2  * This software is released under a licence similar to the Apache Software Licence.
3  * See org.logicalcobwebs.proxool.package.html for details.
4  * The latest version is available at http://proxool.sourceforge.net
5  */

6 package org.logicalcobwebs.proxool.admin;
7
8 import org.logicalcobwebs.proxool.ConnectionInfoIF;
9
10 import java.util.Date JavaDoc;
11
12 /**
13  * Provides a snapshot of a pool
14  *
15  * @version $Revision: 1.3 $, $Date: 2005/10/02 12:32:01 $
16  * @author bill
17  * @author $Author: billhorsman $ (current maintainer)
18  * @since Proxool 0.7
19  */

20 public interface SnapshotIF {
21
22     /**
23      * When the pool was started
24      * @return dateStarted
25      */

26     Date JavaDoc getDateStarted();
27
28     /**
29      * How many connections have been served since the pool started
30      * @return servedCount
31      */

32     long getServedCount();
33
34     /**
35      * How many connections have been refused since the pool started
36      * @return refusedCount
37      */

38     long getRefusedCount();
39
40     /**
41      * The number of active (busy) connections
42      * @return activeConnectionCount
43      */

44     int getActiveConnectionCount();
45
46     /**
47      * The number of available (free) connections
48      * @return availableConnectionCount
49      */

50     int getAvailableConnectionCount();
51
52     /**
53      * The number of offline connections. A connection is offline
54      * if it is being tested by the house keeper.
55      * @return offlineConnectionCount
56      */

57     int getOfflineConnectionCount();
58
59     /**
60      * Get the maximum possible connections (as defined in the
61      * {@link org.logicalcobwebs.proxool.ConnectionPoolDefinitionIF definition}.
62      * @return maximumConnectionCount
63      */

64     int getMaximumConnectionCount();
65
66     /**
67      * The date that this snapshot applies
68      * @return snapshotDate
69      */

70     Date JavaDoc getSnapshotDate();
71
72     /**
73      * The details of each connection. Will be null if this is not a
74      * detailed snapshot.
75      * @return connectionInfos
76      * @see #isDetail
77      */

78     ConnectionInfoIF[] getConnectionInfos();
79
80     /**
81      * The details of one connection. Will be null if this is not a
82      * detailed snapshot or if this ID is not found.
83      * @param id the connection {@link ConnectionInfoIF#getId ID}
84      * @return connectionInfo
85      * @see #isDetail
86      */

87     ConnectionInfoIF getConnectionInfo(long id);
88
89     /**
90      * Whether we have requested detailed information about each
91      * connection
92      * @return detail
93      * @see #getConnectionInfos
94      */

95     boolean isDetail();
96
97     long getConnectionCount();
98 }
99
100
101 /*
102  Revision history:
103  $Log: SnapshotIF.java,v $
104  Revision 1.3 2005/10/02 12:32:01 billhorsman
105  Make connectionCount available to statistics
106
107  Revision 1.2 2003/03/03 11:11:59 billhorsman
108  fixed licence
109
110  Revision 1.1 2003/02/19 23:36:51 billhorsman
111  renamed monitor package to admin
112
113  Revision 1.2 2003/02/12 12:28:28 billhorsman
114  added url, proxyHashcode and delegateHashcode to
115  ConnectionInfoIF
116
117  Revision 1.1 2003/01/31 11:35:57 billhorsman
118  improvements to servlet (including connection details)
119
120  Revision 1.1 2003/01/30 17:20:15 billhorsman
121  fixes, improvements and doc
122
123  */
Popular Tags