Source Code Cross Referenced for Snapshot.java in  » Database-JDBC-Connection-Pool » proxool » org » logicalcobwebs » proxool » admin » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database JDBC Connection Pool » proxool » org.logicalcobwebs.proxool.admin 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


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.apache.commons.logging.Log;
009:        import org.apache.commons.logging.LogFactory;
010:        import org.logicalcobwebs.proxool.ConnectionInfoIF;
011:
012:        import java.util.Collection;
013:        import java.util.Date;
014:
015:        /**
016:         * Implementation of SnapshotIF
017:         *
018:         * @version $Revision: 1.5 $, $Date: 2006/01/18 14:39:57 $
019:         * @author bill
020:         * @author $Author: billhorsman $ (current maintainer)
021:         * @since Proxool 0.7
022:         */
023:        class Snapshot implements  SnapshotIF {
024:
025:            private static final Log LOG = LogFactory.getLog(Snapshot.class);
026:
027:            private Date dateStarted;
028:
029:            private long servedCount;
030:
031:            private long refusedCount;
032:
033:            private int activeConnectionCount;
034:
035:            private int availableConnectionCount;
036:
037:            private int offlineConnectionCount;
038:
039:            private int maximumConnectionCount;
040:
041:            private Date snapshotDate;
042:
043:            private Collection connectionInfos;
044:
045:            private long connectionCount;
046:
047:            /**
048:             * @param snapshotDate see {@link org.logicalcobwebs.proxool.admin.SnapshotIF#getSnapshotDate}
049:             */
050:            public Snapshot(Date snapshotDate) {
051:                this .snapshotDate = snapshotDate;
052:            }
053:
054:            /**
055:             * @see org.logicalcobwebs.proxool.admin.SnapshotIF#getDateStarted
056:             */
057:            public Date getDateStarted() {
058:                return dateStarted;
059:            }
060:
061:            /**
062:             * @see org.logicalcobwebs.proxool.admin.SnapshotIF#getDateStarted
063:             */
064:            public void setDateStarted(Date dateStarted) {
065:                this .dateStarted = dateStarted;
066:            }
067:
068:            /**
069:             * @see org.logicalcobwebs.proxool.admin.SnapshotIF#getServedCount
070:             */
071:            public long getServedCount() {
072:                return servedCount;
073:            }
074:
075:            /**
076:             * @see org.logicalcobwebs.proxool.admin.SnapshotIF#getServedCount
077:             */
078:            public void setServedCount(long servedCount) {
079:                this .servedCount = servedCount;
080:            }
081:
082:            /**
083:             * @see org.logicalcobwebs.proxool.admin.SnapshotIF#getRefusedCount
084:             */
085:            public long getRefusedCount() {
086:                return refusedCount;
087:            }
088:
089:            /**
090:             * @see org.logicalcobwebs.proxool.admin.SnapshotIF#getRefusedCount
091:             */
092:            public void setRefusedCount(long refusedCount) {
093:                this .refusedCount = refusedCount;
094:            }
095:
096:            /**
097:             * @see org.logicalcobwebs.proxool.admin.SnapshotIF#getActiveConnectionCount
098:             */
099:            public int getActiveConnectionCount() {
100:                return activeConnectionCount;
101:            }
102:
103:            /**
104:             * @see org.logicalcobwebs.proxool.admin.SnapshotIF#getActiveConnectionCount
105:             */
106:            public void setActiveConnectionCount(int activeConnectionCount) {
107:                this .activeConnectionCount = activeConnectionCount;
108:            }
109:
110:            /**
111:             * @see org.logicalcobwebs.proxool.admin.SnapshotIF#getAvailableConnectionCount
112:             */
113:            public int getAvailableConnectionCount() {
114:                return availableConnectionCount;
115:            }
116:
117:            /**
118:             * @see org.logicalcobwebs.proxool.admin.SnapshotIF#getAvailableConnectionCount
119:             */
120:            public void setAvailableConnectionCount(int availableConnectionCount) {
121:                this .availableConnectionCount = availableConnectionCount;
122:            }
123:
124:            /**
125:             * @see org.logicalcobwebs.proxool.admin.SnapshotIF#getOfflineConnectionCount
126:             */
127:            public int getOfflineConnectionCount() {
128:                return offlineConnectionCount;
129:            }
130:
131:            /**
132:             * @see org.logicalcobwebs.proxool.admin.SnapshotIF#getOfflineConnectionCount
133:             */
134:            public void setOfflineConnectionCount(int offlineConnectionCount) {
135:                this .offlineConnectionCount = offlineConnectionCount;
136:            }
137:
138:            /**
139:             * @see org.logicalcobwebs.proxool.admin.SnapshotIF#getMaximumConnectionCount
140:             */
141:            public int getMaximumConnectionCount() {
142:                return maximumConnectionCount;
143:            }
144:
145:            /**
146:             * @see org.logicalcobwebs.proxool.admin.SnapshotIF#getMaximumConnectionCount
147:             */
148:            public void setMaximumConnectionCount(int maximumConnectionCount) {
149:                this .maximumConnectionCount = maximumConnectionCount;
150:            }
151:
152:            /**
153:             * @see org.logicalcobwebs.proxool.admin.SnapshotIF#getSnapshotDate
154:             */
155:            public Date getSnapshotDate() {
156:                return snapshotDate;
157:            }
158:
159:            /**
160:             * @see SnapshotIF#getConnectionInfos
161:             */
162:            public ConnectionInfoIF[] getConnectionInfos() {
163:                return (ConnectionInfoIF[]) connectionInfos
164:                        .toArray(new ConnectionInfoIF[connectionInfos.size()]);
165:            }
166:
167:            /**
168:             * @see SnapshotIF#getConnectionInfos
169:             */
170:            public void setConnectionInfos(Collection connectionInfos) {
171:                this .connectionInfos = connectionInfos;
172:            }
173:
174:            /**
175:             * @see SnapshotIF#getConnectionInfo
176:             */
177:            public ConnectionInfoIF getConnectionInfo(long id) {
178:                ConnectionInfoIF connectionInfo = null;
179:                ConnectionInfoIF[] connectionInfos = getConnectionInfos();
180:                for (int i = 0; i < connectionInfos.length; i++) {
181:                    if (connectionInfos[i].getId() == id) {
182:                        connectionInfo = connectionInfos[i];
183:                    }
184:                }
185:                return connectionInfo;
186:            }
187:
188:            /**
189:             * @see SnapshotIF#isDetail
190:             */
191:            public boolean isDetail() {
192:                return connectionInfos != null;
193:            }
194:
195:            public long getConnectionCount() {
196:                return connectionCount;
197:            }
198:
199:            public void setConnectionCount(long connectionCount) {
200:                this .connectionCount = connectionCount;
201:            }
202:        }
203:
204:        /*
205:         Revision history:
206:         $Log: Snapshot.java,v $
207:         Revision 1.5  2006/01/18 14:39:57  billhorsman
208:         Unbundled Jakarta's Commons Logging.
209:
210:         Revision 1.4  2005/10/02 12:32:01  billhorsman
211:         Make connectionCount available to statistics
212:
213:         Revision 1.3  2003/03/10 15:26:51  billhorsman
214:         refactoringn of concurrency stuff (and some import
215:         optimisation)
216:
217:         Revision 1.2  2003/03/03 11:11:59  billhorsman
218:         fixed licence
219:
220:         Revision 1.1  2003/02/19 23:36:51  billhorsman
221:         renamed monitor package to admin
222:
223:         Revision 1.4  2003/02/12 12:28:28  billhorsman
224:         added url, proxyHashcode and delegateHashcode to
225:         ConnectionInfoIF
226:
227:         Revision 1.3  2003/02/06 17:41:06  billhorsman
228:         now uses imported logging
229:
230:         Revision 1.2  2003/01/31 16:38:53  billhorsman
231:         doc (and removing public modifier for classes where possible)
232:
233:         Revision 1.1  2003/01/31 11:35:57  billhorsman
234:         improvements to servlet (including connection details)
235:
236:         Revision 1.1  2003/01/30 17:20:09  billhorsman
237:         fixes, improvements and doc
238:
239:         */
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.