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


java.lang.Object
   org.continuent.sequoia.common.protocol.Commands

Commands
public class Commands (Code)
Protocol commands between Sequoia driver (client) and controller (server). All communications follow a classic RPC scheme: the driver sends a Command code, followed by argument(s) for some of the commands, and expects some answer(s), at the very least an error code or an exception. The server is event-driven; communications are inited by the client which is the one sending Protocol commands, so the verbs send and receive must be understood as from driver point of view. Almost all these commands are put on the wire by client class org.continuent.sequoia.driver.Connection and read (and answered) by class org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.run . The only exceptions are the following commands:
- ProtocolVersion
read only by org.continuent.sequoia.controller.core.ControllerWorkerThread.run , which then constructs the connection and pass it to VirtualDatabaseWorkerThread for the rest of the execution of this command.
- Close
in addition to Connection, also sent by org.continuent.sequoia.driver.ConnectionClosingThread.closeConnection(org.continuent.sequoia.driver.Connection)
- Ping
no more used, was sent on a dedicated connection and silently received only by (again) org.continuent.sequoia.controller.core.ControllerWorkerThread.run

Protocol Data Types

optUTF is a custom type defined like this:
 (boolean false) | (boolean true; UTF somestring)
 

Sent types

Several commands send a SQL query. All SQL queries sent on the wire use the same starting pattern, a requestStub defined below and in org.continuent.sequoia.controller.requests.AbstractRequest.AbstractRequest(StringbooleanintStringint)
requestStub

 UTF     request           : SQL query
 boolean EscapeProcessing
 UTF     LINE_SEPARATOR
 Int     timeout
 boolean autoCommit
 boolean isDriverProcessed
 

Queries that expect a result set (read commands mostly) send immediately after the requestStub a subsetLengths parameter, of type:
subsetLengths. See org.continuent.sequoia.controller.requests.AbstractRequest.receiveResultSetParams(org.continuent.sequoia.common.stream.DriverBufferedInputStream)

 Int    maxRows
 Int    fetchSize
 

Depending on some configuration flag/state (shared by driver and controller), most query commands add an optional skeleton parameter of type optUTF.

Received types

Several commands receive a ResultSet of type:
ResultSet org.continuent.sequoia.driver.DriverResultSet.DriverResultSet(org.continuent.sequoia.driver.Connection)

org.continuent.sequoia.common.protocol.Field Field []   fields
org.continuent.sequoia.common.protocol.TypeTag [] java column types
 ArrayList   data
 optUTF      hasMoreData: cursor name
 
- fields is the description of the ResultSet columns.
- data is the actual data of the ResultSet. Each element of this list is an Object array holding one row of the ResultSet. The whole arraylist is serialized using standard Java serialization/readUnshared().

Exceptions

For almost every command sent, the driver checks if the reply is an exception serialized by the controller instead of the regular reply type. Most exceptions are put on the wire by org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.run TODO: finish the classification below.
Exception reply recognized by the driver in:
FetchNextResultSetRows, closeRemoteResultSet, RestoreConnectionState, setAutoCommit, getCatalog, getCatalogs, setCatalog, getControllerVersionNumber, DatabaseMetaDataGetTables, DatabaseMetaDataGetColumns, DatabaseMetaDataGetPrimaryKeys, DatabaseMetaDataGetProcedureColumns, DatabaseMetaDataGetTableTypes, DatabaseMetaDataGetTablePrivileges, DatabaseMetaDataGetSchemas, DatabaseMetaDataGetDatabaseProductName, DatabaseStaticMetadata
Exception reply ignored by the driver in: Close, Reset
Exceptions catched by instanceof(catch-all) default clause in:
setAutoCommit,
Commands not implemented at all by the driver:
GetVirtualDatabaseName,
TODO:
- exceptions and the server side (VirtualDatabaseWorkerThread)
- double-check arguments and replies
- better topic ordering
author:
   Emmanuel Cecchet
author:
   Nicolas Modrzyk
author:
   Marc Herbert
author:
   Jean-Bernard van Zuylen
author:
  

version:
   1.0


Field Summary
final public static  intBegin
     Begins a new transaction and returns the corresponding transaction identifier.
final public static  intCallableStatementExecute
     Calls a stored procedure using CallableStatement.execute().
final public static  intCallableStatementExecuteQuery
     Calls a stored procedure and returns the reply (ResultSet).
final public static  intCallableStatementExecuteQueryWithParameters
     Calls a stored procedure with IN/OUT and/or named parameters and returns the reply (ResultSet, OUT parameters, named parameters objects).
final public static  intCallableStatementExecuteUpdate
     Calls a stored procedure and returns the number of rows affected (write query).
final public static  intCallableStatementExecuteUpdateWithParameters
     Calls a stored procedure and returns the number of rows affected (write query).
final public static  intCallableStatementExecuteWithParameters
     Calls a stored procedure using CallableStatement.execute().
final public static  intClose
     Close the connection.
final public static  intCloseRemoteResultSet
     Closes a remote ResultSet that was opened for streaming.
final public static  intCommandPrefix
    
final public static  intCommit
     Commits the current transaction.
final public static  intConnectionClearWarnings
    
final public static  intConnectionGetCatalog
     Retrieve the catalog (database) we are connected to.
final public static  intConnectionGetCatalogs
     Retrieve the list of available catalogs (databases).
final public static  intConnectionGetWarnings
     Retrieves the SQLWarning chain associated to a persistent connection to a backend.
final public static  intConnectionSetCatalog
     Connect to another catalog/database (as the same user).
final public static  intControllerPrompt
     "Controller Ready" magic number.
final public static  intDatabaseMetaDataGetAttributes
    
final public static  intDatabaseMetaDataGetBestRowIdentifier
    
final public static  intDatabaseMetaDataGetColumnPrivileges
    
final public static  intDatabaseMetaDataGetColumns
     Used to get the schema columns by calling DatabaseMetaData.getColumns().
final public static  intDatabaseMetaDataGetCrossReference
    
final public static  intDatabaseMetaDataGetDatabaseProductName
     Retrieve the database product name.
final public static  intDatabaseMetaDataGetExportedKeys
    
final public static  intDatabaseMetaDataGetImportedKeys
    
final public static  intDatabaseMetaDataGetIndexInfo
    
final public static  intDatabaseMetaDataGetPrimaryKeys
     Used to get the schema primary keys by calling DatabaseMetaData.getColumns().
final public static  intDatabaseMetaDataGetProcedureColumns
     Used to get the schema procedure columns by calling DatabaseMetaData.getProcedureColumns().
final public static  intDatabaseMetaDataGetProcedures
     Used to get the schema procedures by calling DatabaseMetaData.getProcedures().
final public static  intDatabaseMetaDataGetSchemas
     Retrieve the schemas.
final public static  intDatabaseMetaDataGetSuperTables
    
final public static  intDatabaseMetaDataGetSuperTypes
    
final public static  intDatabaseMetaDataGetTablePrivileges
     Retrieve the table privileges.
final public static  intDatabaseMetaDataGetTableTypes
     Retrieve the database table types.
final public static  intDatabaseMetaDataGetTables
     Used to get the schema tables by calling DatabaseMetaData.getTables().
final public static  intDatabaseMetaDataGetTypeInfo
    
final public static  intDatabaseMetaDataGetUDTs
    
final public static  intDatabaseMetaDataGetVersionColumns
    
final public static  intDatabaseStaticMetadata
     Retrieve one value from the virtual database metadata.
final public static  intFetchNextResultSetRows
     Fetch next rows of data for ResultSet streaming.
final public static  intGetControllerVersionNumber
     Gets the controller version number.
final public static  intGetVirtualDatabaseName
     Gets the virtual database name to be used by the client (Sequoia driver). It currently returns the same result as ConnectionGetCatalog().
final public static  intPing
     Ping was used by the ControllerPingThread to check if a controller is back online after a failure.
final public static  intPreparedStatementGetMetaData
    
final public static  intProtocolVersion
     Command used to create a new connection, while checking that driver and controller are compatible with each other.
final public static  intReleaseSavepoint
    
final public static  intReset
     Reset the connection.
final public static  intRestoreConnectionState
     Restore a connection state after an automatic reconnection.
final public static  intRetrieveCommitResult
     Try to retrieve the result of a previouly executed commit.
final public static  intRetrieveExecuteQueryResult
     Try to retrieve the result of a previouly executed query using executeQuery().
final public static  intRetrieveExecuteQueryResultWithParameters
     Try to retrieve the result of a previouly executed stored procedure with IN/OUT and/or named parameters using executeQuery().
final public static  intRetrieveExecuteResult
     Try to retrieve the result of a previouly executed query.
final public static  intRetrieveExecuteResultWithParameters
     Try to retrieve the result of a previouly executed stored procedure with IN/OUT and/or named parameters.
final public static  intRetrieveExecuteUpdateResult
     Try to retrieve the result of a previouly executed query.
final public static  intRetrieveExecuteUpdateResultWithParameters
     Try to retrieve the result of a previouly executed stored procedure with IN/OUT and/or named parameters.
final public static  intRetrieveExecuteUpdateWithKeysResult
     Try to retrieve the result of a previouly executed query.
final public static  intRetrieveReleaseSavepoint
     Try to retrieve the result of a previouly executed release savepoint using releaseSavepoint().
final public static  intRetrieveRollbackResult
     Try to retrieve the result of a previouly executed rollback.
final public static  intRollback
     Rollbacks the current transaction.
final public static  intRollbackToSavepoint
    
final public static  intSetNamedSavepoint
    
final public static  intSetReadOnly
     Set the connection readonly status.
final public static  intSetTransactionIsolation
     Set the new transaction isolation level to use for this connection.
final public static  intSetUnnamedSavepoint
    
final public static  intStatementExecute
     Execute a request using Statement.execute().
final public static  intStatementExecuteQuery
     Performs a read request and returns the reply.
final public static  intStatementExecuteUpdate
     Performs a write request and returns the number of rows affected.
final public static  intStatementExecuteUpdateWithKeys
     Performs a write request and returns the auto generated keys.


Method Summary
final public static  intgetProtocolMajorVersion(int protocolVersion)
    
final public static  intgetProtocolMinorVersion(int protocolVersion)
    

Field Detail
Begin
final public static int Begin(Code)
Begins a new transaction and returns the corresponding transaction identifier. This method is called from the driver when org.continuent.sequoia.driver.Connection.setAutoCommit(boolean) is called with false argument.

~commandcode


~reply Long transactionId
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase.begin(Stringbooleanlong)




CallableStatementExecute
final public static int CallableStatementExecute(Code)
Calls a stored procedure using CallableStatement.execute(). This returns an arbitrary number of update counts and ResultSets

~commandcode


~argument requestStub
~argument optUTF skeleton


~reply long request id
~reply boolean hasResultSet (true means ResultSet follows, false means Int follows)
~reply Int nbRows (-1 if no more results)
~reply ResultSet
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase.callableStatementExecute(org.continuent.sequoia.controller.requests.StoredProcedure)




CallableStatementExecuteQuery
final public static int CallableStatementExecuteQuery(Code)
Calls a stored procedure and returns the reply (ResultSet).

~commandcode


~argument requestStub
~argument subsetLengths
~argument optUTF skeleton


~reply request id (long)
~reply ResultSet
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase.callableStatementExecuteQuery(org.continuent.sequoia.controller.requests.StoredProcedure)




CallableStatementExecuteQueryWithParameters
final public static int CallableStatementExecuteQueryWithParameters(Code)
Calls a stored procedure with IN/OUT and/or named parameters and returns the reply (ResultSet, OUT parameters, named parameters objects).

~commandcode


~argument requestStub
~argument subsetLengths
~argument optUTF skeleton


~reply request id (long)
~reply ResultSet
~reply int OUT parameter index (0 if no more OUT parameter to be sent)
~reply Object OUT parameter value (if index != 0)
~reply String parameter name ("0" if no more OUT parameter to be sent)
~reply Object named parameter value (if name != "0")

See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase.callableStatementExecuteQuery(org.continuent.sequoia.controller.requests.StoredProcedure)




CallableStatementExecuteUpdate
final public static int CallableStatementExecuteUpdate(Code)
Calls a stored procedure and returns the number of rows affected (write query).

~commandcode


~argument requestStub
~argument optUTF skeleton


~reply long request id
~reply int nbRows
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase.callableStatementExecuteQuery(org.continuent.sequoia.controller.requests.StoredProcedure)




CallableStatementExecuteUpdateWithParameters
final public static int CallableStatementExecuteUpdateWithParameters(Code)
Calls a stored procedure and returns the number of rows affected (write query).

~commandcode


~argument requestStub
~argument optUTF skeleton


~reply long request id
~reply int nbRows (update count)
~reply int OUT parameter index (0 if no more OUT parameter to be sent)
~reply Object OUT parameter value (if index != 0)
~reply String parameter name ("0" if no more OUT parameter to be sent)
~reply Object named parameter value (if name != "0")

See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase.callableStatementExecuteQuery(org.continuent.sequoia.controller.requests.StoredProcedure)




CallableStatementExecuteWithParameters
final public static int CallableStatementExecuteWithParameters(Code)
Calls a stored procedure using CallableStatement.execute(). This returns an arbitrary number of update counts and ResultSets

~commandcode


~argument requestStub
~argument optUTF skeleton


~reply long request id
~reply boolean hasResultSet (true means ResultSet follows, false means Int follows)
~reply Int nbRows (-1 if no more results)
~reply ResultSet
Once all results have been fetched, we fetch OUT and named parameters as follows:
~reply int OUT parameter index (0 if no more OUT parameter to be sent)
~reply Object OUT parameter value (if index != 0)
~reply String parameter name ("0" if no more OUT parameter to be sent)
~reply Object named parameter value (if name != "0")

See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase.callableStatementExecute(org.continuent.sequoia.controller.requests.StoredProcedure)




Close
final public static int Close(Code)
Close the connection. The controller replies a CommandCompleted SequoiaException, ignored by the driver.

~commandcode


~reply <anything>




CloseRemoteResultSet
final public static int CloseRemoteResultSet(Code)
Closes a remote ResultSet that was opened for streaming.

~commandcode


~argument UTF cursorName


~reply SequoiaException CommandCompleted




CommandPrefix
final public static int CommandPrefix(Code)
Command prefix sent before each command



Commit
final public static int Commit(Code)
Commits the current transaction.

~commandcode


~reply Long transactionId: id of commited transaction
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase.commit(longbooleanboolean)




ConnectionClearWarnings
final public static int ConnectionClearWarnings(Code)
Clears the SQLWarning chain associated to a persistent connection

~commandcode
~argument int persistent connection id


~reply boolean true (meaning: not an exception)
See Also:   org.continuent.sequoia.driver.Connection.clearWarnings




ConnectionGetCatalog
final public static int ConnectionGetCatalog(Code)
Retrieve the catalog (database) we are connected to.

~commandcode


~reply String vdbName
See Also:   org.continuent.sequoia.driver.Connection.getCatalog




ConnectionGetCatalogs
final public static int ConnectionGetCatalogs(Code)
Retrieve the list of available catalogs (databases).

~commandcode


~reply ResultSet virtualDatabasesList
See Also:   org.continuent.sequoia.driver.Connection.getCatalogs




ConnectionGetWarnings
final public static int ConnectionGetWarnings(Code)
Retrieves the SQLWarning chain associated to a persistent connection to a backend.

~commandcode
~argument int persistent connection id


~reply BackendDriverException SQLWarning chain wrapped into a bde
See Also:   org.continuent.sequoia.driver.Connection.getWarnings




ConnectionSetCatalog
final public static int ConnectionSetCatalog(Code)
Connect to another catalog/database (as the same user).

~commandcode


~argument UTF catalog


~reply boolean isValidCatalog
See Also:   org.continuent.sequoia.driver.Connection.setCatalog(String)




ControllerPrompt
final public static int ControllerPrompt(Code)
"Controller Ready" magic number.



DatabaseMetaDataGetAttributes
final public static int DatabaseMetaDataGetAttributes(Code)

See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetAttributes



DatabaseMetaDataGetBestRowIdentifier
final public static int DatabaseMetaDataGetBestRowIdentifier(Code)

See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetBestRowIdentifier



DatabaseMetaDataGetColumnPrivileges
final public static int DatabaseMetaDataGetColumnPrivileges(Code)

See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetColumnPrivileges



DatabaseMetaDataGetColumns
final public static int DatabaseMetaDataGetColumns(Code)
Used to get the schema columns by calling DatabaseMetaData.getColumns().

~commandcode


~argument UTF catalog
~argument UTF schemaPattern
~argument UTF tableNamePattern
~argument UTF columnNamePattern


~reply ResultSet schemaColumns
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetColumns




DatabaseMetaDataGetCrossReference
final public static int DatabaseMetaDataGetCrossReference(Code)

See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetCrossReference



DatabaseMetaDataGetDatabaseProductName
final public static int DatabaseMetaDataGetDatabaseProductName(Code)
Retrieve the database product name.

~commandcode


~reply String productName
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetDatabaseProductName




DatabaseMetaDataGetExportedKeys
final public static int DatabaseMetaDataGetExportedKeys(Code)

See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetExportedKeys



DatabaseMetaDataGetImportedKeys
final public static int DatabaseMetaDataGetImportedKeys(Code)

See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetImportedKeys



DatabaseMetaDataGetIndexInfo
final public static int DatabaseMetaDataGetIndexInfo(Code)

See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetIndexInfo



DatabaseMetaDataGetPrimaryKeys
final public static int DatabaseMetaDataGetPrimaryKeys(Code)
Used to get the schema primary keys by calling DatabaseMetaData.getColumns().

~commandcode


~argument UTF catalog
~argument UTF schemaPattern
~argument UTF tableNamePattern


~reply ResultSet pKeys
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetPrimaryKeys




DatabaseMetaDataGetProcedureColumns
final public static int DatabaseMetaDataGetProcedureColumns(Code)
Used to get the schema procedure columns by calling DatabaseMetaData.getProcedureColumns().

~commandcode


~argument UTF catalog
~argument UTF schemaPattern
~argument UTF procedureNamePattern
~argument UTF columnNamePattern


~reply ResultSet procColumns
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetProcedureColumns




DatabaseMetaDataGetProcedures
final public static int DatabaseMetaDataGetProcedures(Code)
Used to get the schema procedures by calling DatabaseMetaData.getProcedures().

~commandcode


~argument UTF catalog
~argument UTF schemaPattern
~argument UTF procedureNamePattern


~reply ResultSet procedures
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetProcedures




DatabaseMetaDataGetSchemas
final public static int DatabaseMetaDataGetSchemas(Code)
Retrieve the schemas.

~commandcode


~reply ResultSet schemas
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetSchemas




DatabaseMetaDataGetSuperTables
final public static int DatabaseMetaDataGetSuperTables(Code)

See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetSuperTables



DatabaseMetaDataGetSuperTypes
final public static int DatabaseMetaDataGetSuperTypes(Code)

See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetSuperTypes



DatabaseMetaDataGetTablePrivileges
final public static int DatabaseMetaDataGetTablePrivileges(Code)
Retrieve the table privileges.

~commandcode


~argument UTF catalog
~argument UTF schemaPattern
~argument UTF tableNamePattern


~reply ResultSet accessRights
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetTablePrivileges




DatabaseMetaDataGetTableTypes
final public static int DatabaseMetaDataGetTableTypes(Code)
Retrieve the database table types.

~commandcode


~reply ResultSet tableTypes
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetTableTypes




DatabaseMetaDataGetTables
final public static int DatabaseMetaDataGetTables(Code)
Used to get the schema tables by calling DatabaseMetaData.getTables().

~commandcode


~argument UTF catalog
~argument UTF schemaPattern
~argument UTF tableNamePattern
~argument String[] types


~reply ResultSet tables
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetTables




DatabaseMetaDataGetTypeInfo
final public static int DatabaseMetaDataGetTypeInfo(Code)

See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetTypeInfo



DatabaseMetaDataGetUDTs
final public static int DatabaseMetaDataGetUDTs(Code)

See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseMetaDataGetUDTs



DatabaseMetaDataGetVersionColumns
final public static int DatabaseMetaDataGetVersionColumns(Code)

See Also:   java.sql.DatabaseMetaData.getVersionColumns(java.lang.Stringjava.lang.Stringjava.lang.String)



DatabaseStaticMetadata
final public static int DatabaseStaticMetadata(Code)
Retrieve one value from the virtual database metadata.

~commandcode


~argument UTF: serialized DatabaseMetaData method call.


~reply Integer|Boolean|String|other ? value
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.databaseStaticMetadata




FetchNextResultSetRows
final public static int FetchNextResultSetRows(Code)
Fetch next rows of data for ResultSet streaming.

~commandcode


~argument UTF cursorName
~argument Int fetchSize


~reply ArrayList data
~reply boolean hasMoreData




GetControllerVersionNumber
final public static int GetControllerVersionNumber(Code)
Gets the controller version number.

~commandcode


~reply String controllerVersion
See Also:   org.continuent.sequoia.controller.core.Controller.getVersionNumber




GetVirtualDatabaseName
final public static int GetVirtualDatabaseName(Code)
Gets the virtual database name to be used by the client (Sequoia driver). It currently returns the same result as ConnectionGetCatalog(). It is currently never used by the driver.

~commandcode


~reply String dbName
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase.getVirtualDatabaseName




Ping
final public static int Ping(Code)
Ping was used by the ControllerPingThread to check if a controller is back online after a failure. Since the new ping mechanism, this command is not used anymore. It is kept for backward compatibility and for future needs



PreparedStatementGetMetaData
final public static int PreparedStatementGetMetaData(Code)

See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.preparedStatementGetMetaData



ProtocolVersion
final public static int ProtocolVersion(Code)
Command used to create a new connection, while checking that driver and controller are compatible with each other.

~commandcode


~argument UTF dataBaseName
~argument UTF user
~argument UTF password

~reply true | (false + failure message (vdb not found))
~reply true | (false + failure message (authentication error))

~argument UTF lineSeparator
~argument boolean persistentConnection

~if persistentConnection true
~reply false if no connection is available on the cluster | (true + persistentConnectionId)

See Also:   org.continuent.sequoia.controller.core.ControllerWorkerThread.run
See Also:   org.continuent.sequoia.driver.ConnectionClosingThread.closeConnection(org.continuent.sequoia.driver.Connection)




ReleaseSavepoint
final public static int ReleaseSavepoint(Code)
Releases a savepoint from a transaction given its id
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase.releaseSavepoint(longString)



Reset
final public static int Reset(Code)
Reset the connection.

~commandcode




RestoreConnectionState
final public static int RestoreConnectionState(Code)
Restore a connection state after an automatic reconnection. Tell the controller if we were in autoCommit mode (i.e.: a transaction was not started), and if we were not then give the current transactionId. Warning: this is not an optUTF type at all.

~commandcode


~argument boolean writeExecutedInTransaction
~argument (boolean true) | (boolean false; Long transactionId)
~argument (boolean false) | (boolean true; persistentConnectionId)




RetrieveCommitResult
final public static int RetrieveCommitResult(Code)
Try to retrieve the result of a previouly executed commit. If the commit was not executed before, the controller will execute it and return the result which is the transaction id acknowledgement.

~commandcode


~reply Long transactionId: id of commited transaction




RetrieveExecuteQueryResult
final public static int RetrieveExecuteQueryResult(Code)
Try to retrieve the result of a previouly executed query using executeQuery().

~commandcode


~argument long request id


~reply ResultSet (or null)




RetrieveExecuteQueryResultWithParameters
final public static int RetrieveExecuteQueryResultWithParameters(Code)
Try to retrieve the result of a previouly executed stored procedure with IN/OUT and/or named parameters using executeQuery().

~commandcode


~argument long request id


~reply ResultSet (or null) ~reply int number of OUT parameters
~reply Object OUT parameter values (nb of times indicated above)
~reply int number of named parameters
~reply String parameter name
~reply Object named parameter value (nb of times indicated above)




RetrieveExecuteResult
final public static int RetrieveExecuteResult(Code)
Try to retrieve the result of a previouly executed query.

~commandcode


~argument long request id


~reply null if no result was found
~reply long request id
~reply boolean hasResultSet (true means ResultSet follows, false means Int follows)
~reply Int nbRows (-1 if no more results)
~reply ResultSet




RetrieveExecuteResultWithParameters
final public static int RetrieveExecuteResultWithParameters(Code)
Try to retrieve the result of a previouly executed stored procedure with IN/OUT and/or named parameters.

~commandcode


~argument long request id


~reply null if no result was found
~reply long request id
~reply boolean hasResultSet (true means ResultSet follows, false means Int follows)
~reply Int nbRows (-1 if no more results)
~reply ResultSet
Once all results have been fetched, we fetch OUT and named parameters as follows:
~reply int number of OUT parameters
~reply Object OUT parameter values (nb of times indicated above)
~reply int number of named parameters
~reply String parameter name
~reply Object named parameter value (nb of times indicated above)




RetrieveExecuteUpdateResult
final public static int RetrieveExecuteUpdateResult(Code)
Try to retrieve the result of a previouly executed query.

~commandcode


~argument long request id


~reply int nbRows (-1 if no result has been found)




RetrieveExecuteUpdateResultWithParameters
final public static int RetrieveExecuteUpdateResultWithParameters(Code)
Try to retrieve the result of a previouly executed stored procedure with IN/OUT and/or named parameters.

~commandcode


~argument long request id


~reply int nbRows (-1 if no result has been found) ~reply int number of OUT parameters
~reply Object OUT parameter values (nb of times indicated above)
~reply int number of named parameters
~reply String parameter name
~reply Object named parameter value (nb of times indicated above)




RetrieveExecuteUpdateWithKeysResult
final public static int RetrieveExecuteUpdateWithKeysResult(Code)
Try to retrieve the result of a previouly executed query.

~commandcode


~argument long request id


~reply int nbRows (-1 if no result has been found)
~reply ResultSet (if nbRows was != -1)




RetrieveReleaseSavepoint
final public static int RetrieveReleaseSavepoint(Code)
Try to retrieve the result of a previouly executed release savepoint using releaseSavepoint().

~commandcode


~argument String savepoint name


~reply boolean: true if the savepoint was removed, false if it is still there.




RetrieveRollbackResult
final public static int RetrieveRollbackResult(Code)
Try to retrieve the result of a previouly executed rollback. If the rollback was not executed before, the controller will execute it and return the result which is the transaction id acknowledgement.

~commandcode


~reply Long transactionId: id of rollbacked transaction




Rollback
final public static int Rollback(Code)
Rollbacks the current transaction.

~commandcode


~reply Long transactionId: id of rollbacked transaction
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase.rollback(longboolean)




RollbackToSavepoint
final public static int RollbackToSavepoint(Code)
Rollbacks the current transaction back to the given savepoint
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.rollbackToSavepoint



SetNamedSavepoint
final public static int SetNamedSavepoint(Code)
Sets a named savepoint to a transaction given its id
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase.setSavepoint(longString)



SetReadOnly
final public static int SetReadOnly(Code)
Set the connection readonly status.

~commandcode


~argument boolean readOnly value


~reply boolean true (meaning: not an exception)
See Also:   org.continuent.sequoia.driver.Connection.setReadOnly(boolean)




SetTransactionIsolation
final public static int SetTransactionIsolation(Code)
Set the new transaction isolation level to use for this connection.

~commandcode


~argument int transaction isolation level


~reply boolean true (meaning: not an exception)
See Also:   org.continuent.sequoia.driver.Connection.setTransactionIsolation(int)




SetUnnamedSavepoint
final public static int SetUnnamedSavepoint(Code)
Sets a unnamed savepoint to a transaction given its id
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase.setSavepoint(long)



StatementExecute
final public static int StatementExecute(Code)
Execute a request using Statement.execute(). This returns an arbitrary number of update counts and ResultSets

~commandcode


~argument requestStub
~argument optUTF skeleton


~reply long request id
~reply boolean hasResultSet (true means ResultSet follows, false means Int follows)
~reply Int nbRows (-1 if no more results)
~reply ResultSet
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase.statementExecute(org.continuent.sequoia.controller.requests.AbstractRequest)




StatementExecuteQuery
final public static int StatementExecuteQuery(Code)
Performs a read request and returns the reply.

~commandcode


~argument Int org.continuent.sequoia.controller.requests.RequestType
~argument requestStub
~argument subsetLengths
~argument optUTF cursorname
~argument optUTF skeleton


~reply ResultSet
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.statementExecuteQuery(org.continuent.sequoia.controller.requests.SelectRequest)




StatementExecuteUpdate
final public static int StatementExecuteUpdate(Code)
Performs a write request and returns the number of rows affected.

~commandcode


~argument Int org.continuent.sequoia.controller.requests.RequestType
~argument requestStub
~argument optUTF skeleton


~reply request id (long)
~reply nbRows (int)
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.statementExecuteUpdate(org.continuent.sequoia.controller.requests.AbstractWriteRequest)




StatementExecuteUpdateWithKeys
final public static int StatementExecuteUpdateWithKeys(Code)
Performs a write request and returns the auto generated keys.

~commandcode


~argument Int org.continuent.sequoia.controller.requests.RequestType
~argument requestStub
~argument subsetLengths
~argument optUTF skeleton


~reply request id (long)
~reply nbRows
~reply ResultSet
See Also:   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabaseWorkerThread.statementExecuteUpdateWithKeys






Method Detail
getProtocolMajorVersion
final public static int getProtocolMajorVersion(int protocolVersion)(Code)
Return the major version number of a protocol
Parameters:
  protocolVersion - the protocol version number to extract the majorfrom the protocol major version number



getProtocolMinorVersion
final public static int getProtocolMinorVersion(int protocolVersion)(Code)
Return the minor version number of a protocol
Parameters:
  protocolVersion - the protocol version number to extract the minorfrom the protocol minor version number



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.