Java Doc for SingleDB.java in  » Database-JDBC-Connection-Pool » sequoia-2.10.9 » org » continuent » sequoia » controller » loadbalancer » singledb » 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 » sequoia 2.10.9 » org.continuent.sequoia.controller.loadbalancer.singledb 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer
      org.continuent.sequoia.controller.loadbalancer.singledb.SingleDB

SingleDB
public class SingleDB extends AbstractLoadBalancer (Code)
Single Database request load balancer.

The requests coming from the request controller are directly forwarded to the single backend. This load balancer does not support multiple backends and does not update the recovery log (it is not meant to be used with a recovery log).
author:
   Emmanuel Cecchet
author:
   Vadim Kassin
author:
   Jaco Swart
author:
   Jean-Bernard van Zuylen
author:
  

version:
   1.0



Field Summary
static  TraceendUserLogger
    

Constructor Summary
public  SingleDB(VirtualDatabase vdb)
     Creates a new SingleDB instance.

Method Summary
public  voidabort(TransactionMetaData tm)
    
public  voidbegin(TransactionMetaData tm)
     Begins a new transaction.
public  ExecuteResultcallableStatementExecute(StoredProcedure proc, MetadataCache metadataCache)
    
public  ControllerResultSetcallableStatementExecuteQuery(StoredProcedure proc, MetadataCache metadataCache)
    
public  ExecuteUpdateResultcallableStatementExecuteUpdate(StoredProcedure proc)
    
public  voidclosePersistentConnection(String login, long persistentConnectionId)
    
public  voidcommit(TransactionMetaData tm)
     Commits a transaction.
public  voiddisableBackend(DatabaseBackend db, boolean forceDisable)
     Disables a backend that was previously enabled.
public  voidenableBackend(DatabaseBackend db, boolean writeEnabled)
     Enables a backend that was previously disabled.
public  StringgetInformation()
    
public  intgetNumberOfEnabledBackends()
    
public  ControllerResultSetgetPreparedStatementGetMetaData(AbstractRequest request)
    
public  StringgetXmlImpl()
    
public  voidopenPersistentConnection(String login, long persistentConnectionId)
    
public  ExecuteResultreadOnlyCallableStatementExecute(StoredProcedure proc, MetadataCache metadataCache)
    
public  ControllerResultSetreadOnlyCallableStatementExecuteQuery(StoredProcedure proc, MetadataCache metadataCache)
    
public  voidreleaseSavepoint(TransactionMetaData tm, String savepointName)
    
public  voidrollback(TransactionMetaData tm)
     Rollbacks a transaction.
public  voidrollbackToSavepoint(TransactionMetaData tm, String savepointName)
    
public  voidsetSavepoint(TransactionMetaData tm, String savepointName)
     Set a savepoint to a transaction.
public  voidsetWeight(String name, int w)
    
public  ExecuteResultstatementExecute(AbstractRequest request, MetadataCache metadataCache)
    
public  ControllerResultSetstatementExecuteQuery(SelectRequest request, MetadataCache metadataCache)
     Performs a read request.
public  ExecuteUpdateResultstatementExecuteUpdate(AbstractWriteRequest request)
     Performs a write request on the backend.
public  GeneratedKeysResultstatementExecuteUpdateWithKeys(AbstractWriteRequest request, MetadataCache metadataCache)
    

Field Detail
endUserLogger
static Trace endUserLogger(Code)




Constructor Detail
SingleDB
public SingleDB(VirtualDatabase vdb) throws Exception(Code)
Creates a new SingleDB instance.
Parameters:
  vdb - the VirtualDatabase this load balancer belongs to
throws:
  Exception - if there is not exactly one backend attached to theVirtualDatabase




Method Detail
abort
public void abort(TransactionMetaData tm) throws SQLException(Code)

See Also:   org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer.abort(org.continuent.sequoia.controller.requestmanager.TransactionMetaData)



begin
public void begin(TransactionMetaData tm) throws SQLException(Code)
Begins a new transaction.
Parameters:
  tm - the transaction marker metadata
exception:
  SQLException - if an error occurs



callableStatementExecute
public ExecuteResult callableStatementExecute(StoredProcedure proc, MetadataCache metadataCache) throws SQLException(Code)

See Also:   org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer.callableStatementExecute(StoredProcedureMetadataCache)



callableStatementExecuteQuery
public ControllerResultSet callableStatementExecuteQuery(StoredProcedure proc, MetadataCache metadataCache) throws SQLException(Code)

See Also:   org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer.callableStatementExecuteQuery(StoredProcedureMetadataCache)



callableStatementExecuteUpdate
public ExecuteUpdateResult callableStatementExecuteUpdate(StoredProcedure proc) throws SQLException(Code)

See Also:   org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer.callableStatementExecuteUpdate(org.continuent.sequoia.controller.requests.StoredProcedure)



closePersistentConnection
public void closePersistentConnection(String login, long persistentConnectionId) throws SQLException(Code)

See Also:   org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer.closePersistentConnection(java.lang.Stringlong)



commit
public void commit(TransactionMetaData tm) throws SQLException(Code)
Commits a transaction.
Parameters:
  tm - the transaction marker metadata
exception:
  SQLException - if an error occurs



disableBackend
public void disableBackend(DatabaseBackend db, boolean forceDisable) throws SQLException(Code)
Disables a backend that was previously enabled. Asks the corresponding connection manager to finalize the connections if needed.
Parameters:
  db - the database backend to disable
Parameters:
  forceDisable - true if disabling must be forced on the backend
throws:
  SQLException - if an error occurs



enableBackend
public void enableBackend(DatabaseBackend db, boolean writeEnabled) throws SQLException(Code)
Enables a backend that was previously disabled. Asks the corresponding connection manager to initialize the connections if needed.
Parameters:
  db - the database backend to enable
Parameters:
  writeEnabled - True if the backend must be enabled for writes
throws:
  SQLException - if an error occurs



getInformation
public String getInformation()(Code)
Gets information about the request load balancer String containing information



getNumberOfEnabledBackends
public int getNumberOfEnabledBackends()(Code)

See Also:   org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer.getNumberOfEnabledBackends



getPreparedStatementGetMetaData
public ControllerResultSet getPreparedStatementGetMetaData(AbstractRequest request) throws SQLException(Code)

See Also:   org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer.getPreparedStatementGetMetaData(AbstractRequest)



getXmlImpl
public String getXmlImpl()(Code)

See Also:   org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer.getXmlImpl



openPersistentConnection
public void openPersistentConnection(String login, long persistentConnectionId) throws SQLException(Code)

See Also:   org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer.openPersistentConnection(Stringlong)



readOnlyCallableStatementExecute
public ExecuteResult readOnlyCallableStatementExecute(StoredProcedure proc, MetadataCache metadataCache) throws SQLException(Code)

See Also:   org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer.readOnlyCallableStatementExecute(org.continuent.sequoia.controller.requests.StoredProcedureorg.continuent.sequoia.controller.cache.metadata.MetadataCache)



readOnlyCallableStatementExecuteQuery
public ControllerResultSet readOnlyCallableStatementExecuteQuery(StoredProcedure proc, MetadataCache metadataCache) throws SQLException(Code)

See Also:   org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer.readOnlyCallableStatementExecuteQuery(StoredProcedureMetadataCache)



releaseSavepoint
public void releaseSavepoint(TransactionMetaData tm, String savepointName) throws SQLException(Code)
Release a savepoint from a transaction
Parameters:
  tm - The transaction marker metadata
Parameters:
  savepointName - The name of the savepoint ro release
throws:
  SQLException - if an error occurs



rollback
public void rollback(TransactionMetaData tm) throws SQLException(Code)
Rollbacks a transaction.
Parameters:
  tm - the transaction marker metadata
exception:
  SQLException - if an error occurs



rollbackToSavepoint
public void rollbackToSavepoint(TransactionMetaData tm, String savepointName) throws SQLException(Code)
Rollback a transaction to a savepoint
Parameters:
  tm - The transaction marker metadata
Parameters:
  savepointName - The name of the savepoint
throws:
  SQLException - if an error occurs



setSavepoint
public void setSavepoint(TransactionMetaData tm, String savepointName) throws AllBackendsFailedException, SQLException(Code)
Set a savepoint to a transaction.
Parameters:
  tm - The transaction marker metadata
Parameters:
  savepointName - The name of the new savepoint
throws:
  AllBackendsFailedException - if no backend succeeded in setting thesavepoint.
throws:
  SQLException - if an error occurs



setWeight
public void setWeight(String name, int w) throws SQLException(Code)

See Also:   org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer.setWeight(Stringint)



statementExecute
public ExecuteResult statementExecute(AbstractRequest request, MetadataCache metadataCache) throws SQLException(Code)

See Also:   org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer.statementExecute(org.continuent.sequoia.controller.requests.AbstractRequestorg.continuent.sequoia.controller.cache.metadata.MetadataCache)



statementExecuteQuery
public ControllerResultSet statementExecuteQuery(SelectRequest request, MetadataCache metadataCache) throws SQLException(Code)
Performs a read request. It is up to the implementation to choose to which backend node(s) this request should be sent.
Parameters:
  request - an SelectRequest
Parameters:
  metadataCache - MetadataCache (null if none) the corresponding java.sql.ResultSet
exception:
  SQLException - if an error occurs



statementExecuteUpdate
public ExecuteUpdateResult statementExecuteUpdate(AbstractWriteRequest request) throws SQLException(Code)
Performs a write request on the backend.
Parameters:
  request - an AbstractWriteRequest number of rows affected by the request
exception:
  SQLException - if an error occurs



statementExecuteUpdateWithKeys
public GeneratedKeysResult statementExecuteUpdateWithKeys(AbstractWriteRequest request, MetadataCache metadataCache) throws SQLException(Code)

See Also:   AbstractLoadBalancer.statementExecuteUpdateWithKeys(AbstractWriteRequestMetadataCache)



Fields inherited from org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer
protected ReadPrioritaryFIFOWriteLock backendListLock(Code)(Java Doc)
protected ArrayList enabledBackends(Code)(Java Doc)
protected static Trace logger(Code)(Java Doc)
protected MacrosHandler macroHandler(Code)(Java Doc)
protected int parsingGranularity(Code)(Java Doc)
protected int raidbLevel(Code)(Java Doc)
protected RecoveryLog recoveryLog(Code)(Java Doc)
protected LinkedList totalOrderQueue(Code)(Java Doc)
protected VirtualDatabase vdb(Code)(Java Doc)
public WaitForCompletionPolicy waitForCompletionPolicy(Code)(Java Doc)

Methods inherited from org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer
abstract public void abort(TransactionMetaData tm) throws SQLException(Code)(Java Doc)
protected int acquireLockAndCheckNbOfThreads(Object request, String requestDescription) throws SQLException, NoMoreBackendException(Code)(Java Doc)
abstract public void begin(TransactionMetaData tm) throws SQLException(Code)(Java Doc)
abstract public ExecuteResult callableStatementExecute(StoredProcedure proc, MetadataCache metadataCache) throws AllBackendsFailedException, SQLException(Code)(Java Doc)
abstract public ControllerResultSet callableStatementExecuteQuery(StoredProcedure proc, MetadataCache metadataCache) throws AllBackendsFailedException, SQLException(Code)(Java Doc)
abstract public ExecuteUpdateResult callableStatementExecuteUpdate(StoredProcedure proc) throws AllBackendsFailedException, SQLException(Code)(Java Doc)
abstract public void closePersistentConnection(String login, long persistentConnectionId) throws SQLException(Code)(Java Doc)
abstract public void commit(TransactionMetaData tm) throws AllBackendsFailedException, SQLException(Code)(Java Doc)
abstract public void disableBackend(DatabaseBackend db, boolean forceDisable) throws SQLException(Code)(Java Doc)
abstract public void enableBackend(DatabaseBackend db, boolean writeEnabled) throws SQLException(Code)(Java Doc)
final public static ExecuteResult executeCallableStatementExecuteOnBackend(StoredProcedure proc, DatabaseBackend backend, BackendWorkerThread workerThread, PooledConnection pc, MetadataCache metadataCache) throws SQLException, BadConnectionException(Code)(Java Doc)
final public static ControllerResultSet executeCallableStatementExecuteQueryOnBackend(StoredProcedure proc, DatabaseBackend backend, BackendWorkerThread workerThread, Connection c, MetadataCache metadataCache) throws SQLException, BadConnectionException(Code)(Java Doc)
final public static ExecuteUpdateResult executeCallableStatementExecuteUpdateOnBackend(StoredProcedure proc, DatabaseBackend backend, BackendWorkerThread workerThread, PooledConnection pc) throws SQLException, BadConnectionException(Code)(Java Doc)
final public static ExecuteResult executeStatementExecuteOnBackend(AbstractRequest request, DatabaseBackend backend, BackendWorkerThread workerThread, PooledConnection pc, MetadataCache metadataCache) throws SQLException, BadConnectionException(Code)(Java Doc)
final public static ControllerResultSet executeStatementExecuteQueryOnBackend(SelectRequest request, DatabaseBackend backend, BackendWorkerThread workerThread, Connection c, MetadataCache metadataCache) throws SQLException, BadConnectionException, UnreachableBackendException(Code)(Java Doc)
final public static ExecuteUpdateResult executeStatementExecuteUpdateOnBackend(AbstractWriteRequest request, DatabaseBackend backend, BackendWorkerThread workerThread, PooledConnection pc) throws SQLException, BadConnectionException(Code)(Java Doc)
final public static GeneratedKeysResult executeStatementExecuteUpdateWithKeysOnBackend(AbstractWriteRequest request, DatabaseBackend backend, BackendWorkerThread workerThread, PooledConnection pc, MetadataCache metadataCache) throws SQLException, BadConnectionException(Code)(Java Doc)
final public static Connection getConnectionAndBeginTransaction(DatabaseBackend backend, AbstractConnectionManager cm, AbstractRequest request) throws SQLException, UnreachableBackendException(Code)(Java Doc)
final public static int getDefaultTransactionIsolationLevel()(Code)(Java Doc)
abstract public String getInformation()(Code)(Java Doc)
protected int getNbToWait(int nbOfThreads)(Code)(Java Doc)
public int getNumberOfEnabledBackends()(Code)(Java Doc)
public int getParsingGranularity()(Code)(Java Doc)
abstract public ControllerResultSet getPreparedStatementGetMetaData(AbstractRequest request) throws SQLException(Code)(Java Doc)
public int getRAIDbLevel()(Code)(Java Doc)
final public RecoveryLog getRecoveryLog()(Code)(Java Doc)
public String getXml()(Code)(Java Doc)
abstract public String getXmlImpl()(Code)(Java Doc)
public void handleMacros(AbstractRequest request)(Code)(Java Doc)
abstract public void openPersistentConnection(String login, long persistentConnectionId) throws SQLException(Code)(Java Doc)
final public static ControllerResultSet preparedStatementGetMetaDataOnBackend(String sqlTemplate, DatabaseBackend backend, Connection c) throws SQLException, BadConnectionException(Code)(Java Doc)
abstract public ExecuteResult readOnlyCallableStatementExecute(StoredProcedure proc, MetadataCache metadataCache) throws SQLException(Code)(Java Doc)
abstract public ControllerResultSet readOnlyCallableStatementExecuteQuery(StoredProcedure proc, MetadataCache metadataCache) throws SQLException(Code)(Java Doc)
protected void releaseLockAndUnlockNextQuery(Object currentQuery)(Code)(Java Doc)
abstract public void releaseSavepoint(TransactionMetaData tm, String name) throws AllBackendsFailedException, SQLException(Code)(Java Doc)
public void removeObjectFromAndNotifyTotalOrderQueue(Object request)(Code)(Java Doc)
abstract public void rollback(TransactionMetaData tm) throws AllBackendsFailedException, SQLException(Code)(Java Doc)
abstract public void rollbackToSavepoint(TransactionMetaData tm, String savepointName) throws AllBackendsFailedException, SQLException(Code)(Java Doc)
final public void setDefaultTransactionIsolationLevel(int defaultTransactionIsolationLevel)(Code)(Java Doc)
public void setMacroHandler(MacrosHandler handler)(Code)(Java Doc)
final public void setRecoveryLog(RecoveryLog recoveryLog)(Code)(Java Doc)
abstract public void setSavepoint(TransactionMetaData tm, String name) throws AllBackendsFailedException, SQLException(Code)(Java Doc)
public void setWeight(String name, int w) throws SQLException(Code)(Java Doc)
abstract public ExecuteResult statementExecute(AbstractRequest request, MetadataCache metadataCache) throws AllBackendsFailedException, SQLException(Code)(Java Doc)
abstract public ControllerResultSet statementExecuteQuery(SelectRequest request, MetadataCache metadataCache) throws SQLException, AllBackendsFailedException(Code)(Java Doc)
abstract public ExecuteUpdateResult statementExecuteUpdate(AbstractWriteRequest request) throws AllBackendsFailedException, NoMoreBackendException, SQLException(Code)(Java Doc)
abstract public GeneratedKeysResult statementExecuteUpdateWithKeys(AbstractWriteRequest request, MetadataCache metadataCache) throws AllBackendsFailedException, NoMoreBackendException, SQLException(Code)(Java Doc)
public void waitForSuspendWritesToComplete(AbstractRequest request)(Code)(Java Doc)
public static void waitForTaskCompletion(long timeout, String requestDescription, AbstractTask task) throws SQLException(Code)(Java Doc)
public boolean waitForTotalOrder(Object request, boolean errorIfNotFound)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.