Source Code Cross Referenced for ResourcePool.java in  » Database-JDBC-Connection-Pool » c3p0 » com » mchange » v2 » resourcepool » 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 » c3p0 » com.mchange.v2.resourcepool 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Distributed as part of c3p0 v.0.9.1.2
003:         *
004:         * Copyright (C) 2005 Machinery For Change, Inc.
005:         *
006:         * Author: Steve Waldman <swaldman@mchange.com>
007:         *
008:         * This library is free software; you can redistribute it and/or modify
009:         * it under the terms of the GNU Lesser General Public License version 2.1, as 
010:         * published by the Free Software Foundation.
011:         *
012:         * This software is distributed in the hope that it will be useful,
013:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
014:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
015:         * GNU Lesser General Public License for more details.
016:         *
017:         * You should have received a copy of the GNU Lesser General Public License
018:         * along with this software; see the file LICENSE.  If not, write to the
019:         * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
020:         * Boston, MA 02111-1307, USA.
021:         */
022:
023:        package com.mchange.v2.resourcepool;
024:
025:        import com.mchange.v1.util.ClosableResource;
026:
027:        public interface ResourcePool extends ClosableResource {
028:            // status in pool return values
029:            final static int KNOWN_AND_AVAILABLE = 0;
030:            final static int KNOWN_AND_CHECKED_OUT = 1;
031:            final static int UNKNOWN_OR_PURGED = -1;
032:
033:            public Object checkoutResource() throws ResourcePoolException,
034:                    InterruptedException;
035:
036:            public Object checkoutResource(long timeout)
037:                    throws TimeoutException, ResourcePoolException,
038:                    InterruptedException;
039:
040:            public void checkinResource(Object resc)
041:                    throws ResourcePoolException;
042:
043:            public void checkinAll() throws ResourcePoolException;
044:
045:            public int statusInPool(Object resc) throws ResourcePoolException;
046:
047:            /**
048:             * Marks a resource as broken. If the resource is checked in,
049:             * it will be destroyed immediately. Otherwise, it will be
050:             * destroyed on checkin.
051:             */
052:            public void markBroken(Object resc) throws ResourcePoolException;
053:
054:            public int getMinPoolSize() throws ResourcePoolException;
055:
056:            public int getMaxPoolSize() throws ResourcePoolException;
057:
058:            public int getPoolSize() throws ResourcePoolException;
059:
060:            public void setPoolSize(int size) throws ResourcePoolException;
061:
062:            public int getAvailableCount() throws ResourcePoolException;
063:
064:            public int getExcludedCount() throws ResourcePoolException;
065:
066:            public int getAwaitingCheckinCount() throws ResourcePoolException;
067:
068:            public long getEffectiveExpirationEnforcementDelay()
069:                    throws ResourcePoolException;
070:
071:            public long getStartTime() throws ResourcePoolException;
072:
073:            public long getUpTime() throws ResourcePoolException;
074:
075:            public long getNumFailedCheckins() throws ResourcePoolException;
076:
077:            public long getNumFailedCheckouts() throws ResourcePoolException;
078:
079:            public long getNumFailedIdleTests() throws ResourcePoolException;
080:
081:            public int getNumCheckoutWaiters() throws ResourcePoolException;
082:
083:            public Throwable getLastAcquisitionFailure()
084:                    throws ResourcePoolException;
085:
086:            public Throwable getLastCheckinFailure()
087:                    throws ResourcePoolException;
088:
089:            public Throwable getLastCheckoutFailure()
090:                    throws ResourcePoolException;
091:
092:            public Throwable getLastIdleCheckFailure()
093:                    throws ResourcePoolException;
094:
095:            public Throwable getLastResourceTestFailure()
096:                    throws ResourcePoolException;
097:
098:            /**
099:             * Discards all resources managed by the pool
100:             * and reacquires new resources to populate the
101:             * pool. Current checked out resources will still
102:             * be valid, and should still be checked into the
103:             * pool (so the pool can destroy them).
104:             */
105:            public void resetPool() throws ResourcePoolException;
106:
107:            public void close() throws ResourcePoolException;
108:
109:            public void close(boolean close_checked_out_resources)
110:                    throws ResourcePoolException;
111:
112:            public interface Manager {
113:                public Object acquireResource() throws Exception;
114:
115:                public void refurbishIdleResource(Object resc) throws Exception;
116:
117:                public void refurbishResourceOnCheckout(Object resc)
118:                        throws Exception;
119:
120:                public void refurbishResourceOnCheckin(Object resc)
121:                        throws Exception;
122:
123:                public void destroyResource(Object resc) throws Exception;
124:            }
125:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.