001: /*
002: * This software is released under a licence similar to the Apache Software Licence.
003: * See org.logicalcobwebs.proxool.package.html for details.
004: * The latest version is available at http://proxool.sourceforge.net
005: */
006: package org.logicalcobwebs.proxool.admin;
007:
008: import org.logicalcobwebs.proxool.ConnectionInfoIF;
009:
010: import java.util.Date;
011:
012: /**
013: * Provides a snapshot of a pool
014: *
015: * @version $Revision: 1.3 $, $Date: 2005/10/02 12:32:01 $
016: * @author bill
017: * @author $Author: billhorsman $ (current maintainer)
018: * @since Proxool 0.7
019: */
020: public interface SnapshotIF {
021:
022: /**
023: * When the pool was started
024: * @return dateStarted
025: */
026: Date getDateStarted();
027:
028: /**
029: * How many connections have been served since the pool started
030: * @return servedCount
031: */
032: long getServedCount();
033:
034: /**
035: * How many connections have been refused since the pool started
036: * @return refusedCount
037: */
038: long getRefusedCount();
039:
040: /**
041: * The number of active (busy) connections
042: * @return activeConnectionCount
043: */
044: int getActiveConnectionCount();
045:
046: /**
047: * The number of available (free) connections
048: * @return availableConnectionCount
049: */
050: int getAvailableConnectionCount();
051:
052: /**
053: * The number of offline connections. A connection is offline
054: * if it is being tested by the house keeper.
055: * @return offlineConnectionCount
056: */
057: int getOfflineConnectionCount();
058:
059: /**
060: * Get the maximum possible connections (as defined in the
061: * {@link org.logicalcobwebs.proxool.ConnectionPoolDefinitionIF definition}.
062: * @return maximumConnectionCount
063: */
064: int getMaximumConnectionCount();
065:
066: /**
067: * The date that this snapshot applies
068: * @return snapshotDate
069: */
070: Date getSnapshotDate();
071:
072: /**
073: * The details of each connection. Will be null if this is not a
074: * detailed snapshot.
075: * @return connectionInfos
076: * @see #isDetail
077: */
078: ConnectionInfoIF[] getConnectionInfos();
079:
080: /**
081: * The details of one connection. Will be null if this is not a
082: * detailed snapshot or if this ID is not found.
083: * @param id the connection {@link ConnectionInfoIF#getId ID}
084: * @return connectionInfo
085: * @see #isDetail
086: */
087: ConnectionInfoIF getConnectionInfo(long id);
088:
089: /**
090: * Whether we have requested detailed information about each
091: * connection
092: * @return detail
093: * @see #getConnectionInfos
094: */
095: boolean isDetail();
096:
097: long getConnectionCount();
098: }
099:
100: /*
101: Revision history:
102: $Log: SnapshotIF.java,v $
103: Revision 1.3 2005/10/02 12:32:01 billhorsman
104: Make connectionCount available to statistics
105:
106: Revision 1.2 2003/03/03 11:11:59 billhorsman
107: fixed licence
108:
109: Revision 1.1 2003/02/19 23:36:51 billhorsman
110: renamed monitor package to admin
111:
112: Revision 1.2 2003/02/12 12:28:28 billhorsman
113: added url, proxyHashcode and delegateHashcode to
114: ConnectionInfoIF
115:
116: Revision 1.1 2003/01/31 11:35:57 billhorsman
117: improvements to servlet (including connection details)
118:
119: Revision 1.1 2003/01/30 17:20:15 billhorsman
120: fixes, improvements and doc
121:
122: */
|