Source Code Cross Referenced for DatabaseCluster.java in  » Database-JDBC-Connection-Pool » HA-JDBC » net » sf » hajdbc » 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 » HA JDBC » net.sf.hajdbc 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * HA-JDBC: High-Availability JDBC
003:         * Copyright (c) 2004-2007 Paul Ferraro
004:         * 
005:         * This library is free software; you can redistribute it and/or modify it 
006:         * under the terms of the GNU Lesser General Public License as published by the 
007:         * Free Software Foundation; either version 2.1 of the License, or (at your 
008:         * option) any later version.
009:         * 
010:         * This library is distributed in the hope that it will be useful, but WITHOUT
011:         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
012:         * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 
013:         * for more details.
014:         * 
015:         * You should have received a copy of the GNU Lesser General Public License
016:         * along with this library; if not, write to the Free Software Foundation, 
017:         * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
018:         * 
019:         * Contact: ferraro@users.sourceforge.net
020:         */
021:        package net.sf.hajdbc;
022:
023:        import java.util.Collection;
024:        import java.util.List;
025:        import java.util.Map;
026:        import java.util.concurrent.ExecutorService;
027:
028:        /**
029:         * @author Paul Ferraro
030:         * @param <D> either java.sql.Driver or javax.sql.DataSource
031:         */
032:        public interface DatabaseCluster<D> {
033:            /**
034:             * Returns the identifier of this cluster.
035:             * @return an identifier
036:             */
037:            public String getId();
038:
039:            /**
040:             * Activates the specified database
041:             * @param database a database descriptor
042:             * @return true, if the database was activated, false it was already active
043:             */
044:            public boolean activate(Database<D> database,
045:                    StateManager stateManager);
046:
047:            /**
048:             * Deactivates the specified database
049:             * @param database a database descriptor
050:             * @return true, if the database was deactivated, false it was already inactive
051:             */
052:            public boolean deactivate(Database<D> database,
053:                    StateManager stateManager);
054:
055:            /**
056:             * Returns the database identified by the specified id
057:             * @param id a database identifier
058:             * @return a database descriptor
059:             * @throws IllegalArgumentException if no database exists with the specified identifier
060:             */
061:            public Database<D> getDatabase(String id);
062:
063:            /**
064:             * Returns the Balancer implementation used by this database cluster.
065:             * @return an implementation of <code>Balancer</code>
066:             */
067:            public Balancer<D> getBalancer();
068:
069:            /**
070:             * Returns an executor service used to execute transactional database writes.
071:             * @return an implementation of <code>ExecutorService</code>
072:             */
073:            public ExecutorService getTransactionalExecutor();
074:
075:            /**
076:             * Returns an executor service used to execute non-transactional database writes.
077:             * @return an implementation of <code>ExecutorService</code>
078:             */
079:            public ExecutorService getNonTransactionalExecutor();
080:
081:            /**
082:             * Returns a dialect capable of returning database vendor specific values.
083:             * @return an implementation of <code>Dialect</code>
084:             */
085:            public Dialect getDialect();
086:
087:            /**
088:             * Returns a LockManager capable of acquiring named read/write locks on the specific objects in this database cluster.
089:             * @return a LockManager implementation
090:             */
091:            public LockManager getLockManager();
092:
093:            /**
094:             * Sets the LockManager implementation capable of acquiring named read/write locks on the specific objects in this database cluster.
095:             */
096:            public void setLockManager(LockManager lockManager);
097:
098:            /**
099:             * Returns a StateManager for persisting database cluster state.
100:             * @return a StateManager implementation
101:             */
102:            public StateManager getStateManager();
103:
104:            /**
105:             * Sets the StateManager implementation for persisting database cluster state.
106:             */
107:            public void setStateManager(StateManager stateManager);
108:
109:            /**
110:             * Returns a DatabaseMetaData cache.
111:             * @return a <code>DatabaseMetaDataCache</code> implementation
112:             */
113:            public DatabaseMetaDataCache getDatabaseMetaDataCache();
114:
115:            /**
116:             * Indicates whether or not sequence detection is enabled for this cluster.
117:             * @return true, if sequence detection is enabled, false otherwise.
118:             */
119:            public boolean isSequenceDetectionEnabled();
120:
121:            /**
122:             * Indicates whether or not identity column detection is enabled for this cluster.
123:             * @return true, if identity column detection is enabled, false otherwise.
124:             */
125:            public boolean isIdentityColumnDetectionEnabled();
126:
127:            /**
128:             * Indicates whether or not non-deterministic CURRENT_DATE SQL functions will be evaluated to deterministic static values.
129:             * @return true, if temporal SQL replacement is enabled, false otherwise.
130:             */
131:            public boolean isCurrentDateEvaluationEnabled();
132:
133:            /**
134:             * Indicates whether or not non-deterministic CURRENT_TIME functions will be evaluated to deterministic static values.
135:             * @return true, if temporal SQL replacement is enabled, false otherwise.
136:             */
137:            public boolean isCurrentTimeEvaluationEnabled();
138:
139:            /**
140:             * Indicates whether or not non-deterministic CURRENT_TIMESTAMP functions will be evaluated to deterministic static values.
141:             * @return true, if temporal SQL replacement is enabled, false otherwise.
142:             */
143:            public boolean isCurrentTimestampEvaluationEnabled();
144:
145:            /**
146:             * Indicates whether or not non-deterministic RAND() functions will be replaced by evaluated to static values.
147:             * @return true, if temporal SQL replacement is enabled, false otherwise.
148:             */
149:            public boolean isRandEvaluationEnabled();
150:
151:            /**
152:             * Determines whether the specified databases are alive.
153:             * @param databases a collection of database descriptors
154:             * @return a map of alive status to set of database descriptors
155:             */
156:            public Map<Boolean, List<Database<D>>> getAliveMap(
157:                    Collection<Database<D>> databases);
158:
159:            /**
160:             * Starts this database cluster.
161:             * @throws Exception if cluster could not be started
162:             */
163:            public void start() throws Exception;
164:
165:            /**
166:             * Stops this database cluster
167:             */
168:            public void stop();
169:
170:            /**
171:             * Indicates whether or not this cluster is active, i.e. started, but not yet stopped.
172:             * @return true, if this cluster is active, false otherwise.
173:             */
174:            public boolean isActive();
175:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.