Source Code Cross Referenced for ConnectionInfo.java in  » Database-JDBC-Connection-Pool » proxool » org » logicalcobwebs » proxool » 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 
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;
007:
008:        import org.logicalcobwebs.proxool.util.FastArrayList;
009:
010:        import java.util.Date;
011:        import java.util.List;
012:
013:        /**
014:         * Implementation of ConnectionInfoIF. Unlike ConnectionPool it is
015:         * frozen and will not change. Used with a {@link org.logicalcobwebs.proxool.admin.SnapshotIF snapshot}
016:         *
017:         * @version $Revision: 1.8 $, $Date: 2005/10/07 08:18:23 $
018:         * @author bill
019:         * @author $Author: billhorsman $ (current maintainer)
020:         * @since Proxool 0.7
021:         */
022:        class ConnectionInfo implements  ConnectionInfoIF {
023:
024:            private Date birthDate;
025:
026:            private long age;
027:
028:            private long id;
029:
030:            private int mark;
031:
032:            private int status;
033:
034:            private long timeLastStartActive;
035:
036:            private long timeLastStopActive;
037:
038:            private String requester;
039:
040:            private String delegateDriver;
041:
042:            private String delegateUrl;
043:
044:            private String proxyHashcode;
045:
046:            private String delegateHashcode;
047:
048:            private List sqlCalls = new FastArrayList();
049:
050:            public Date getBirthDate() {
051:                return birthDate;
052:            }
053:
054:            public long getBirthTime() {
055:                return birthDate.getTime();
056:            }
057:
058:            public void setBirthDate(Date birthDate) {
059:                this .birthDate = birthDate;
060:            }
061:
062:            public long getAge() {
063:                return age;
064:            }
065:
066:            public void setAge(long age) {
067:                this .age = age;
068:            }
069:
070:            public long getId() {
071:                return id;
072:            }
073:
074:            public void setId(long id) {
075:                this .id = id;
076:            }
077:
078:            public int getMark() {
079:                return mark;
080:            }
081:
082:            public void setMark(int mark) {
083:                this .mark = mark;
084:            }
085:
086:            public int getStatus() {
087:                return status;
088:            }
089:
090:            public void setStatus(int status) {
091:                this .status = status;
092:            }
093:
094:            public long getTimeLastStartActive() {
095:                return timeLastStartActive;
096:            }
097:
098:            public void setTimeLastStartActive(long timeLastStartActive) {
099:                this .timeLastStartActive = timeLastStartActive;
100:            }
101:
102:            public long getTimeLastStopActive() {
103:                return timeLastStopActive;
104:            }
105:
106:            public void setTimeLastStopActive(long timeLastStopActive) {
107:                this .timeLastStopActive = timeLastStopActive;
108:            }
109:
110:            public String getRequester() {
111:                return requester;
112:            }
113:
114:            public void setRequester(String requester) {
115:                this .requester = requester;
116:            }
117:
118:            public String getDelegateDriver() {
119:                return delegateDriver;
120:            }
121:
122:            public void setDelegateDriver(String delegateDriver) {
123:                this .delegateDriver = delegateDriver;
124:            }
125:
126:            public String getDelegateUrl() {
127:                return delegateUrl;
128:            }
129:
130:            public void setDelegateUrl(String delegateUrl) {
131:                this .delegateUrl = delegateUrl;
132:            }
133:
134:            public String getProxyHashcode() {
135:                return proxyHashcode;
136:            }
137:
138:            public void setProxyHashcode(String proxyHashcode) {
139:                this .proxyHashcode = proxyHashcode;
140:            }
141:
142:            public String getDelegateHashcode() {
143:                return delegateHashcode;
144:            }
145:
146:            public void setDelegateHashcode(String delegateHashcode) {
147:                this .delegateHashcode = delegateHashcode;
148:            }
149:
150:            /**
151:             * Compares using {@link #getId()}
152:             * @param o must be another {@link ConnectionInfoIF} implementation
153:             * @return the comparison
154:             * @see Comparable#compareTo(Object)
155:             */
156:            public int compareTo(Object o) {
157:                return new Long(((ConnectionInfoIF) o).getId())
158:                        .compareTo(new Long(getId()));
159:            }
160:
161:            public String[] getSqlCalls() {
162:                return (String[]) sqlCalls.toArray(new String[0]);
163:            }
164:
165:            public void addSqlCall(String sqlCall) {
166:                this .sqlCalls.add(sqlCall);
167:            }
168:        }
169:
170:        /*
171:         Revision history:
172:         $Log: ConnectionInfo.java,v $
173:         Revision 1.8  2005/10/07 08:18:23  billhorsman
174:         New sqlCalls gives list of SQL calls rather than just he most recent (for when a connection makes more than one call before being returned to the pool)
175:
176:         Revision 1.7  2005/09/26 10:01:31  billhorsman
177:         Added lastSqlCall when trace is on.
178:
179:         Revision 1.6  2003/10/30 00:05:50  billhorsman
180:         now implements Comparable (using ID)
181:
182:         Revision 1.5  2003/03/03 11:11:56  billhorsman
183:         fixed licence
184:
185:         Revision 1.4  2003/02/19 23:46:09  billhorsman
186:         renamed monitor package to admin
187:
188:         Revision 1.3  2003/02/12 12:28:27  billhorsman
189:         added url, proxyHashcode and delegateHashcode to
190:         ConnectionInfoIF
191:
192:         Revision 1.2  2003/01/31 16:53:15  billhorsman
193:         checkstyle
194:
195:         Revision 1.1  2003/01/31 11:47:14  billhorsman
196:         new snapshot of connection info
197:
198:         */
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.