Source Code Cross Referenced for ConnectionInfoIF.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 java.util.Date;
009:
010:        /**
011:         * Provides information about an individual connection. You can get a collection
012:         * of these from {@link ProxoolFacade#getConnectionInfos ProxoolFacade}. You
013:         * get back information about all the connections in a particular pool.
014:         *
015:         * <pre>
016:         * String alias = "myPool";
017:         * Iterator i = ProxoolFacade.getConnectionInfos(alias).iterator();
018:         * while (i.hasNext()) {
019:         *  ConnectionInfoIF c = (ConnectionInfoIF)i.next();
020:         *   ...
021:         * }
022:         * </pre>
023:         *
024:         * @version $Revision: 1.12 $, $Date: 2005/10/07 08:18:23 $
025:         * @author billhorsman
026:         * @author $Author: billhorsman $ (current maintainer)
027:         */
028:        public interface ConnectionInfoIF extends Comparable {
029:
030:            /**
031:             * Default - treat as normal
032:             * @see #getMark
033:             */
034:            static final int MARK_FOR_USE = 0;
035:
036:            /**
037:             * The next time this connection is made available we should expire it.
038:             * @see #getMark
039:             */
040:            static final int MARK_FOR_EXPIRY = 1;
041:
042:            /**
043:             * This is the start and end state of every connection
044:             * @see #getStatus
045:             */
046:            static final int STATUS_NULL = 0;
047:
048:            /**
049:             * The connection is available for use
050:             * @see #getStatus
051:             */
052:            static final int STATUS_AVAILABLE = 1;
053:
054:            /**
055:             * The connection is in use
056:             * @see #getStatus
057:             */
058:            static final int STATUS_ACTIVE = 2;
059:
060:            /**
061:             * The connection is in use by the house keeping thread
062:             * @see #getStatus
063:             */
064:            static final int STATUS_OFFLINE = 3;
065:
066:            /**
067:             * The time that this connection was created.
068:             * The number of milliseconds
069:             * since midnight, January 1, 1970 UTC.
070:             */
071:            long getBirthTime();
072:
073:            /**
074:             * Like {@link #getBirthTime} but in Date format
075:             * @return birthDate
076:             */
077:            Date getBirthDate();
078:
079:            /**
080:             * The age in millseconds since this connection was built
081:             */
082:            long getAge();
083:
084:            /**
085:             * A unique ID for this connection
086:             */
087:            long getId();
088:
089:            /**
090:             * Sometimes we want do something to a connection but can't because it is still
091:             * active and we don't want to disrupt its use. So we mark it instead and when it
092:             * stops being active we can perform the necessary operation.
093:             *
094:             * The only thing we do at the moment is {@link #MARK_FOR_EXPIRY expire} the
095:             * connection (if it is too old for instance). And this will happen if the
096:             * housekeeper decides it should but the connection is still active.
097:             */
098:            int getMark();
099:
100:            /**
101:             * The status of the connection. Can be either:
102:             * {@link #STATUS_NULL null},
103:             * {@link #STATUS_AVAILABLE available},
104:             * {@link #STATUS_ACTIVE active} or
105:             * {@link #STATUS_OFFLINE offline}.
106:             */
107:            int getStatus();
108:
109:            /**
110:             * When this connection was last given out.  The number of milliseconds
111:             * since midnight, January 1, 1970 UTC.
112:             */
113:            long getTimeLastStartActive();
114:
115:            /**
116:             * When this connection was last given back (or zero if it is still active).
117:             * The number of milliseconds
118:             * since midnight, January 1, 1970 UTC.
119:             */
120:            long getTimeLastStopActive();
121:
122:            /**
123:             * The name of the thread that asked for this connection.
124:             */
125:            String getRequester();
126:
127:            /**
128:             * The hashcode (in hex) of the ProxyConnection object. This
129:             * uniquely identifies this proxy connection.
130:             * @return proxyHashcode
131:             */
132:            String getProxyHashcode();
133:
134:            /**
135:             * The hashcode (in hex) of the delegate connection object. This
136:             * uniquely identifies the underlying connection.
137:             * @return delegateHashcode
138:             */
139:            String getDelegateHashcode();
140:
141:            /**
142:             * The URL that this connection is using (the definition
143:             * might have changed since this connection was built).
144:             * @return delegateUrl
145:             */
146:            String getDelegateUrl();
147:
148:            /**
149:             * A log of the last SQL used on this connection. Only populated
150:             * if {@link org.logicalcobwebs.proxool.ConnectionPoolDefinitionIF#isTrace()}
151:             * is enabled.
152:             * @return the most recent SQL to be used
153:             */
154:            String[] getSqlCalls();
155:
156:        }
157:
158:        /*
159:         Revision history:
160:         $Log: ConnectionInfoIF.java,v $
161:         Revision 1.12  2005/10/07 08:18:23  billhorsman
162:         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)
163:
164:         Revision 1.11  2005/09/26 10:01:31  billhorsman
165:         Added lastSqlCall when trace is on.
166:
167:         Revision 1.10  2003/10/30 00:05:50  billhorsman
168:         now implements Comparable (using ID)
169:
170:         Revision 1.9  2003/03/03 11:11:57  billhorsman
171:         fixed licence
172:
173:         Revision 1.8  2003/02/12 12:28:27  billhorsman
174:         added url, proxyHashcode and delegateHashcode to
175:         ConnectionInfoIF
176:
177:         Revision 1.7  2003/01/31 11:38:57  billhorsman
178:         birthDate now stored as Date not long
179:
180:         Revision 1.6  2003/01/27 18:26:35  billhorsman
181:         refactoring of ProxyConnection and ProxyStatement to
182:         make it easier to write JDK 1.2 patch
183:
184:         Revision 1.5  2003/01/15 00:12:13  billhorsman
185:         doc
186:
187:         Revision 1.4  2002/12/15 19:21:42  chr32
188:         Changed @linkplain to @link (to preserve JavaDoc for 1.2/1.3 users).
189:
190:         Revision 1.3  2002/10/25 16:00:19  billhorsman
191:         added better class javadoc
192:
193:         Revision 1.2  2002/09/18 13:48:56  billhorsman
194:         checkstyle and doc
195:
196:         Revision 1.1.1.1  2002/09/13 08:12:32  billhorsman
197:         new
198:
199:         Revision 1.3  2002/06/28 11:19:47  billhorsman
200:         improved doc
201:
202:         */
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.