[Proxool-cvs] proxool/src/java/org/logicalcobwebs/proxool ConnectionPool.java,1.80,1.81 ConnectionPo
UNMAINTAINED!
Brought to you by:
billhorsman
From: <bil...@us...> - 2005-10-02 22:55:03
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11208/src/java/org/logicalcobwebs/proxool Modified Files: ConnectionPool.java ConnectionPoolStatisticsIF.java Log Message: Make connectionCount available to statistics Index: ConnectionPool.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionPool.java,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** ConnectionPool.java 26 Sep 2005 09:54:14 -0000 1.80 --- ConnectionPool.java 2 Oct 2005 12:32:02 -0000 1.81 *************** *** 65,74 **** private int nextAvailableConnection = 0; - /** - * This is usually the same as poolableConnections.size() but it sometimes higher. It is - * alwasy right, since a connection exists before it is added to the pool - */ - private int connectionCount = 0; - private long connectionsServedCount = 0; --- 65,68 ---- *************** *** 161,165 **** */ ! if (connectionCount >= getDefinition().getMaximumConnectionCount() && getAvailableConnectionCount() < 1) { connectionsRefusedCount++; if (admin != null) { --- 155,159 ---- */ ! if (prototyper.quickRefuse()) { connectionsRefusedCount++; if (admin != null) { *************** *** 477,481 **** acquirePrimaryWriteLock(); ! if (connectionPoolUp == true) { connectionPoolUp = false; --- 471,475 ---- acquirePrimaryWriteLock(); ! if (connectionPoolUp) { connectionPoolUp = false; *************** *** 700,707 **** protected void registerRemovedConnection(int status) { - connectionCount--; - prototyper.connectionRemoved(); - connectionCountByState[status]--; } --- 694,698 ---- *************** *** 1109,1112 **** --- 1100,1107 ---- return prototyper; } + + public long getConnectionCount() { + return getPrototyper().getConnectionCount(); + } } *************** *** 1114,1117 **** --- 1109,1115 ---- Revision history: $Log$ + Revision 1.81 2005/10/02 12:32:02 billhorsman + Make connectionCount available to statistics + Revision 1.80 2005/09/26 09:54:14 billhorsman Avoid suspected deadlock when getting a detailed snapshot. Only attempt to get the concurrent lock for 10 seconds before giving up. Index: ConnectionPoolStatisticsIF.java =================================================================== RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionPoolStatisticsIF.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ConnectionPoolStatisticsIF.java 3 Mar 2003 11:11:57 -0000 1.5 --- ConnectionPoolStatisticsIF.java 2 Oct 2005 12:32:02 -0000 1.6 *************** *** 63,66 **** --- 63,67 ---- Date getDateStarted(); + long getConnectionCount(); } *************** *** 68,71 **** --- 69,75 ---- Revision history: $Log$ + Revision 1.6 2005/10/02 12:32:02 billhorsman + Make connectionCount available to statistics + Revision 1.5 2003/03/03 11:11:57 billhorsman fixed licence |