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


java.lang.Object
   org.continuent.sequoia.controller.virtualdatabase.VirtualDatabase

All known Subclasses:   org.continuent.sequoia.controller.virtualdatabase.DistributedVirtualDatabase,
VirtualDatabase
public class VirtualDatabase implements XmlComponent(Code)
A VirtualDatabase represents a database from client point of view and hide the complexity of the cluster distribution to the client. The client always uses the virtual database name and the Sequoia Controller will use the real connections when an SQL request comes in.
author:
   Emmanuel Cecchet
author:
   Mathieu Peltier
author:
   Nicolas Modrzyk
author:
   Vadim Kassin
author:
   Jean-Bernard van Zuylen
author:
  

version:
   1.0


Field Summary
final public static  intCHECK_BACKEND_DISABLE
    
final public static  intCHECK_BACKEND_ENABLE
    
final protected  ObjectCONNECTION_ID_SYNC_OBJECT
    
final public static  intNO_CHECK_BACKEND
    
protected  AuthenticationManagerauthenticationManager
    
protected  ArrayListbackends
    
protected  longconnectionId
    
 Controllercontroller
    
protected  intcurrentNbOfThreads
    
static  TraceendUserLogger
    
protected  Tracelogger
    
protected  intmaxNbOfConnections
    
protected  intmaxNbOfThreads
    
protected  longmaxThreadIdleTime
    
protected  VirtualDatabaseDynamicMetaDatametadata
    
protected  intminNbOfThreads
    
protected  Stringname
    
protected  NotificationBroadcasterSupportnotificationBroadcasterSupport
    
protected  intnotificationSequence
    
protected  booleanpoolConnectionThreads
    
protected  TracerequestLogger
    
protected  RequestManagerrequestManager
    
protected  ReadPrioritaryFIFOWriteLockrwLock
    
protected  booleanshuttingDown
    
protected  VirtualDatabaseStaticMetaDatastaticMetadata
    
protected  LinkedListtotalOrderQueue
    

Constructor Summary
public  VirtualDatabase(Controller controller, String name, int maxConnections, boolean pool, int minThreads, int maxThreads, long maxThreadIdleTime, int sqlShortFormLength, boolean useStaticResultSetMetaData, boolean enforceTableExistenceIntoSchema)
     Creates a new VirtualDatabase instance.

Method Summary
public  voidabort(long transactionId, boolean logAbort, boolean forceAbort)
     Abort a transaction that has been started but in which no query was executed.
final public  voidacquireReadLockBackendLists()
     Acquires a read lock on the backend lists (both enabled and disabled backends).
protected  voidaddAdminOperation(AbstractAdminOperation operation)
    
public  voidaddBackend(DatabaseBackend db)
     Add a backend to this virtual database.
public  voidaddBackend(DatabaseBackend db, boolean checkForCompliance)
     Add a backend to this virtual database.
public  voidaddVirtualDatabaseWorkerThread(VirtualDatabaseWorkerThread thread)
     Add a VirtualDatabaseWorkerThread to the list of active threads.
public  voidbackupBackend(String backendName, String login, String password, String dumpName, String backuperName, String path, boolean force, ArrayList tables)
    
public  longbegin(String login, boolean isPersistentConnection, long persistentConnectionId)
     Begins a new transaction and returns the corresponding transaction identifier.
public  StringbuildCheckpointName(String event)
     Returns a cluster-wide unique checkpoint name.
protected  ExecuteResultcallableStatementExecute(StoredProcedure proc)
     Execute a call to CallableStatement.execute() and returns a suite of updateCount and/or ResultSets.
protected  ControllerResultSetcallableStatementExecuteQuery(StoredProcedure proc)
     Call a stored procedure that returns a ResultSet.
protected  ExecuteUpdateResultcallableStatementExecuteUpdate(StoredProcedure proc)
     Call a stored procedure that performs an update.
public  booleancheckAdminAuthentication(String adminLogin, String adminPassword)
     Checks if a given admin login/password is ok.
Parameters:
  adminLogin - admin user login
Parameters:
  adminPassword - admin user password true if the login/password is known from theAuthenticationManager.
public  voidcheckAndAddVirtualDatabaseUser(VirtualDatabaseUser vdbUser)
     Adds a new vdb user.
public  booleancheckUserAuthentication(String virtualLogin, String virtualPassword)
     Checks if a given virtual login/password is ok.
Parameters:
  virtualLogin - the virtual user login
Parameters:
  virtualPassword - the virtual user password true if the login/password is known from theAuthenticationManager.
public  voidcleanMonitoringData()
    
public  voidclearConnectionWarnings(long connId)
     Forwards call to clearWarnings() to the given persistent connections on each backend.
public  voidclosePersistentConnection(String login, long persistentConnectionId)
     Close the given persistent connection.
public  voidcommit(long transactionId, boolean logCommit, boolean emptyTransaction)
     Commits a transaction given its id.
public  voidcopyDump(String dumpName, String remoteControllerName)
    
public  voidcopyLogFromCheckpoint(String dumpName, String controllerName)
    
protected  voiddecreaseCurrentNbOfThread()
     Substract one to currentNbOfThreads.
protected  voiddecreaseIdleThread()
     Remove an idle thread.
public  voiddeleteDump(String dumpName, boolean keepsFile)
     Delete the dump entry associated to the dumpName.
If keepsFile is false, the dump file is also removed from the file system.
public  voiddeleteLogUpToCheckpoint(String checkpointName)
    
public  voiddisableAllBackends(boolean forceEnable)
     Prepare this virtual database for shutdown.
public  voiddisableAllBackendsWithCheckpoint(String checkpoint)
    
public  voiddisableBackendWithCheckpoint(String backendName)
    
public  VirtualDatabaseStaticMetaDatadoGetStaticMetaData()
    
public  voidenableAllBackends()
     Enable all the backends without any check.
public  voidenableAllBackendsFromCheckpoint()
    
public  voidenableBackendFromCheckpoint(String backendName, String checkpointName)
     Enable the given backend from the given checkpoint.
public  voidenableBackendFromCheckpoint(String backendName)
    
public  booleanenforceTableExistenceIntoSchema()
     Indicates if the virtual database requires that tables referenced in a query exist into the schema.
public  booleanequals(Object other)
     Two virtual databases are equal if they have the same name and group.
public  voidfailoverForPersistentConnection(long persistentConnectionId)
    
public  voidfailoverForTransaction(long currentTid)
    
public  voidforceDisableBackend(String backendName)
    
public  voidforceEnableAllBackendsFromCheckpoint(String checkpoint)
     Prepare this virtual database for startup.
public  voidforceEnableBackend(String backendName)
    
public  ArrayListgetActiveThreads()
     Returns the activeThreads list.
public  ArrayListgetAllBackendNames()
    
public  DatabaseBackendgetAndCheckBackend(String backendName, int testEnable)
     Find the DatabaseBackend corresponding to the given backend name and check if it is possible to disable this backend.
public  AuthenticationManagergetAuthenticationManager()
     Returns the authentication manager of this virtual database.
public  DumpInfo[]getAvailableDumps()
    
public  StringgetBackendInformation(String backendName)
    
public  StringgetBackendSchema(String backendName)
    
public  StringgetBackendState(String backendName)
    
public  BackendStatisticsgetBackendStatistics(String backendName)
    
public  ArrayListgetBackends()
    
public  String[]getBackuperNames()
    
public  SQLWarninggetConnectionWarnings(long connId)
    
public  intgetCurrentNbOfThreads()
    
public  StringgetDatabaseName()
     Gets the virtual database name to be used by the client (Sequoia driver) This method should be used for local references only (it is faster).
public  StringgetDatabaseProductName()
    
public  DatabaseSchemagetDatabaseSchemaFromActiveBackends()
     Get the current database schema from merging the schemas of all active backends.
public  DatabaseSchemagetDatabaseSchemaFromActiveBackendsAndRefreshDatabaseProductNames()
     Get the current database schema from merging the schemas of all active backends.
protected  StringgetDistributionXml()
     Get the XML dump of the Distribution element if any.
public  StringgetDumpFormatForBackuper(String backuperName)
    
public  VirtualDatabaseDynamicMetaDatagetDynamicMetaData()
    
 DatabaseBackendgetFirstAvailableBackend()
    
public  intgetIdleThreads()
     Returns the number of idle worker threads.
final public  TracegetLogger()
     Returns the logger value.
public  intgetMaxNbOfConnections()
     Returns the maxNbOfConnections.
public  intgetMaxNbOfThreads()
     Returns the maxNbOfThreads.
public  longgetMaxThreadIdleTime()
     Returns the maxThreadIdleTime.
public  intgetMinNbOfThreads()
     Returns the minNbOfThreads.
public  longgetNextConnectionId()
     Return the next connection identifier (monotically increasing number).
public  longgetNextRequestId()
     Return the next request identifier (monotically increasing number).
protected  intgetNumberOfEnabledBackends()
    
public  intgetNumberOfSavepointsInTransaction(long tId)
     Returns the number of savepoints that are defined for a given transaction by asking to the request manager.
public  ArrayListgetPendingConnections()
     Returns the pendingConnections.
public  ControllerResultSetgetPreparedStatementGetMetaData(AbstractRequest request)
    
public  RequestManagergetRequestManager()
     Gets the request manager associated to this database.
public  SQLMonitoringgetSQLMonitor()
    
public  intgetSqlShortFormLength()
     Return the sql short form length to use when reporting an error.
public  VirtualDatabaseStaticMetaDatagetStaticMetaData()
     Get the whole static metadata for this virtual database.
public  LinkedListgetTotalOrderQueue()
     Returns the totalOrderQueue value.
public  StringgetVirtualDatabaseName()
    
public  VirtualDatabaseWorkerThreadgetVirtualDatabaseWorkerThreadForPersistentConnection(long persistentConnectionId)
     Return the VirtualDatabaseWorkerThread that is currently executing the persistent connection identified by the provided id.
public  VirtualDatabaseWorkerThreadgetVirtualDatabaseWorkerThreadForTransaction(long transactionId)
     Return the VirtualDatabaseWorkerThread that is currently executing the transaction identified by the provided id.
public  StringgetXml()
    
public  booleanhasPersistentConnection(long persistentConnectionId)
     Returns true if the virtual database has opened the given persistent connection.
public  booleanhasRecoveryLog()
    
public  booleanhasResultCache()
    
protected  voidincrementCurrentNbOfThread()
     Adds one to currentNbOfThreads.
protected  voidincrementIdleThreadCount()
     Method add an idle thread.
public  voidinitializeFromBackend(String databaseBackendName, boolean force)
    
public  booleanisDistributed()
    
public  booleanisDumpNameAvailable(String tentativeDumpName)
     Checks if the dump name is available.
public  booleanisPoolConnectionThreads()
     Returns the poolConnectionThreads.
public  booleanisRejectingNewTransaction()
    
protected  booleanisResyncing()
     Returns true if this vdb is resynching.
public  booleanisShuttingDown()
     Return true if this database is shutting down.
public  booleanisValidUserForAllBackends(VirtualDatabaseUser vdbUser)
     Checks if a vdb user is valid as a user for allbackends.
Parameters:
  vdbUser - vdb user to be checked.
public  voidopenPersistentConnection(String login, long persistentConnectionId)
     Open the given persistent connection.
public  voidperformAddVirtualDatabaseUser(VirtualDatabaseUser vdbUser)
     Adds new vdb user and its corresponding connection managers.
public  voidperformRemoveVirtualDatabaseUser(VirtualDatabaseUser vdbUser)
     Removes vdb user and its corresponding connection managers.
final public  voidreleaseReadLockBackendLists()
     Releases the read lock on the backend lists (both enabled and disabled backends).
public  voidreleaseSavepoint(long transactionId, String savepointName)
     Releases a savepoint given its name from a transaction given its id.
protected  booleanremoveAdminOperation(AbstractAdminOperation operation)
     Remove a currently executing admin operation.
public  voidremoveBackend(String backend)
    
public  voidremoveBackend(DatabaseBackend db)
     Remove a backend from this virtual database.
public  voidremoveCheckpoint(String checkpointName)
    
public  voidreplicateBackend(String backendName, String newBackendName, Map parameters)
    
public  voidrestoreDumpOnBackend(String databaseBackendName, String login, String password, String dumpName, ArrayList tables)
    
public  String[][]retrieveBackendsData()
    
public  voidrollback(long transactionId, boolean logRollback)
     Rollbacks a transaction given its id.
public  voidrollback(long transactionId, String savepointName)
    
protected  voidsendJmxNotification(String type, String message)
    
public  voidsetAuthenticationManager(AuthenticationManager authenticationManager)
     Sets the authentication manager for this virtual database.
public  voidsetBackendLastKnownCheckpoint(String backendName, String checkpoint)
    
public  voidsetMaxNbOfConnections(int maxNbOfConnections)
     Sets the maxNbOfConnections.
public  voidsetMaxNbOfThreads(int maxNbOfThreads)
     Sets the maxNbOfThreads.
public  voidsetMaxThreadIdleTime(long maxThreadIdleTime)
     Sets the maxThreadIdleTime.
public  voidsetMinNbOfThreads(int minNbOfThreads)
     Sets the minNbOfThreads.
public  voidsetMonitoringToActive(boolean active)
    
public  voidsetNotificationBroadcasterSupport(NotificationBroadcasterSupport notificationBroadcasterSupport)
     Sets the NotificationBroadcasterSupport associated with the MBean managing this virtual database.
public  voidsetPoolConnectionThreads(boolean poolConnectionThreads)
     Sets the poolConnectionThreads.
public  voidsetRejectingNewTransaction(boolean canAcceptNewTransaction)
    
public  voidsetRequestManager(RequestManager requestManager)
     Sets a new request manager for this database.
public  voidsetSQLMonitor(SQLMonitoring sqlMonitor)
    
public  intsetSavepoint(long transactionId)
     Sets a unnamed savepoint to a transaction given its id.
public  voidsetSavepoint(long transactionId, String name)
     Sets a savepoint given its desired name to a transaction given its id.
public  voidsetShutdownCheckpoint()
     Sets a checkpoint indicating that this vdb has shutdown.
public  voidsetShuttingDown(boolean shuttingDown)
    
public  voidsetStaticDatabaseSchema(DatabaseSchema schema)
     Sets a new static database schema for this database if no one exist or merge the given schema to the existing one.
public  voidshutdown(int level)
    
protected  ExecuteResultstatementExecute(AbstractRequest request)
     Execute a request using Statement.execute().
protected  ControllerResultSetstatementExecuteQuery(SelectRequest request)
     Performs a read request and returns the reply.
protected  ExecuteUpdateResultstatementExecuteUpdate(AbstractWriteRequest request)
     Performs a write request and returns the number of rows affected.
protected  GeneratedKeysResultstatementExecuteUpdateWithKeys(AbstractWriteRequest request)
     Performs a write request and returns the auto generated keys.
public  voidstoreBackendsInfo()
    
public  voidtransferBackend(String backend, String controllerDestination)
    
public  voidtransferDump(String dumpName, String remoteControllerName, boolean noCopy)
    
public  voidupdateDumpPath(String dumpName, String newPath)
    
final public  booleanuseStaticResultSetMetaData()
     Returns the useStaticResultSetMetaData value.
public  ArrayListviewAllClientNames()
    
public  String[]viewBackendInformation(String backendName)
    
public  ArrayListviewCheckpointNames()
    
public  String[]viewControllerList()
    
public  HashtableviewGroupBackends()
    
public  StringviewOwningController()
    

Field Detail
CHECK_BACKEND_DISABLE
final public static int CHECK_BACKEND_DISABLE(Code)
Use for method getAndCheck



CHECK_BACKEND_ENABLE
final public static int CHECK_BACKEND_ENABLE(Code)
Use for method getAndCheck



CONNECTION_ID_SYNC_OBJECT
final protected Object CONNECTION_ID_SYNC_OBJECT(Code)



NO_CHECK_BACKEND
final public static int NO_CHECK_BACKEND(Code)
Use for method getAndCheck



authenticationManager
protected AuthenticationManager authenticationManager(Code)
Authentification manager matching virtual database login/password to backends login/password



backends
protected ArrayList backends(Code)
ArrayList of DatabaseBackend objects



connectionId
protected long connectionId(Code)



controller
Controller controller(Code)
The controller we belong to



currentNbOfThreads
protected int currentNbOfThreads(Code)
Current number of worker threads



endUserLogger
static Trace endUserLogger(Code)
end user logger



logger
protected Trace logger(Code)
Virtual database logger



maxNbOfConnections
protected int maxNbOfConnections(Code)
Maximum number of concurrent accepted for this virtual database



maxNbOfThreads
protected int maxNbOfThreads(Code)
Maximum number of worker threads to fork



maxThreadIdleTime
protected long maxThreadIdleTime(Code)
Maximum time a worker thread can remain idle before dying



metadata
protected VirtualDatabaseDynamicMetaData metadata(Code)
Virtual Database MetaData



minNbOfThreads
protected int minNbOfThreads(Code)
Minimum number of worker threads to keep in the pool if poolConnectionThreads is true



name
protected String name(Code)
Virtual database name



notificationBroadcasterSupport
protected NotificationBroadcasterSupport notificationBroadcasterSupport(Code)



notificationSequence
protected int notificationSequence(Code)



poolConnectionThreads
protected boolean poolConnectionThreads(Code)
If false one worker thread is forked per connection else



requestLogger
protected Trace requestLogger(Code)



requestManager
protected RequestManager requestManager(Code)
The request manager to use for this database



rwLock
protected ReadPrioritaryFIFOWriteLock rwLock(Code)
Read/Write lock for backend list



shuttingDown
protected boolean shuttingDown(Code)
Marker to see if the database is shutting down



staticMetadata
protected VirtualDatabaseStaticMetaData staticMetadata(Code)



totalOrderQueue
protected LinkedList totalOrderQueue(Code)
ArrayList to store the order of requests




Constructor Detail
VirtualDatabase
public VirtualDatabase(Controller controller, String name, int maxConnections, boolean pool, int minThreads, int maxThreads, long maxThreadIdleTime, int sqlShortFormLength, boolean useStaticResultSetMetaData, boolean enforceTableExistenceIntoSchema)(Code)
Creates a new VirtualDatabase instance.
Parameters:
  name - the virtual database name.
Parameters:
  maxConnections - maximum number of concurrent connections.
Parameters:
  pool - should we use a pool of threads for handling connections?
Parameters:
  minThreads - minimum number of threads in the pool
Parameters:
  maxThreads - maximum number of threads in the pool
Parameters:
  maxThreadIdleTime - maximum time a thread can remain idle before beingremoved from the pool.
Parameters:
  sqlShortFormLength - maximum number of characters of an SQL statementto diplay in traces or exceptions
Parameters:
  useStaticResultSetMetaData - true if DatabaseResultSetMetaData shoulduse static fields or try to fetch the metadata from the underlyingdatabase
Parameters:
  controller - the controller we belong to




Method Detail
abort
public void abort(long transactionId, boolean logAbort, boolean forceAbort) throws SQLException(Code)
Abort a transaction that has been started but in which no query was executed. As we use lazy transaction begin, there is no need to rollback such transaction but just to cleanup the metadata associated with this not effectively started transaction.
Parameters:
  transactionId - id of the transaction to abort
Parameters:
  logAbort - true if the abort (in fact rollback) should be logged inthe recovery log
Parameters:
  forceAbort - true if the abort will be forced. Actually, abort will donothing when a transaction has savepoints (we do not abort thewhole transaction, so that the user can rollback to a previoussavepoint), except when the connection is closed. In this lastcase, if the transaction is not aborted, it prevents futuremaintenance operations such as shutdowns, enable/disable fromcompleting, so we have to force this abort operation. It alsoapplies to the DeadlockDetectionThread and the cleanup of theVirtualDatabaseWorkerThread.
throws:
  SQLException - if an error occurs



acquireReadLockBackendLists
final public void acquireReadLockBackendLists() throws InterruptedException(Code)
Acquires a read lock on the backend lists (both enabled and disabled backends). This should be called prior traversing the backend ArrayList.
throws:
  InterruptedException - if an error occurs



addAdminOperation
protected void addAdminOperation(AbstractAdminOperation operation)(Code)
Add an admin operation to the list of current admin operations
Parameters:
  operation - the operation to add



addBackend
public void addBackend(DatabaseBackend db) throws VirtualDatabaseException(Code)
Add a backend to this virtual database.
Parameters:
  db - the database backend to add
throws:
  VirtualDatabaseException - if an error occurs



addBackend
public void addBackend(DatabaseBackend db, boolean checkForCompliance) throws VirtualDatabaseException(Code)
Add a backend to this virtual database.
Parameters:
  db - the database backend to add
Parameters:
  checkForCompliance - should load the driver ?
throws:
  VirtualDatabaseException - if an error occurs



addVirtualDatabaseWorkerThread
public void addVirtualDatabaseWorkerThread(VirtualDatabaseWorkerThread thread)(Code)
Add a VirtualDatabaseWorkerThread to the list of active threads.
Parameters:
  thread - the VirtualDatabaseWorkerThread to add



backupBackend
public void backupBackend(String backendName, String login, String password, String dumpName, String backuperName, String path, boolean force, ArrayList tables) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.backupBackend(StringStringStringStringStringStringbooleanArrayList)



begin
public long begin(String login, boolean isPersistentConnection, long persistentConnectionId) throws SQLException(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.

Note that the transaction begin is not logged in the recovery log by this method, you will have to call logLazyTransactionBegin.
Parameters:
  login - the login used by the connection
Parameters:
  isPersistentConnection - true if the transaction is started on apersistent connection
Parameters:
  persistentConnectionId - persistent connection id if the transactionmust be started on a persistent connection an unique transaction identifier
exception:
  SQLException - if an error occurs
See Also:   RequestManager.logLazyTransactionBegin(long)




buildCheckpointName
public String buildCheckpointName(String event)(Code)
Returns a cluster-wide unique checkpoint name.

Unicity is needed since checkpoints are always set cluster-wide.
Parameters:
  event - the reason why this checkpoint is being set a cluster-wide unique checkpoint name




callableStatementExecute
protected ExecuteResult callableStatementExecute(StoredProcedure proc) throws SQLException(Code)
Execute a call to CallableStatement.execute() and returns a suite of updateCount and/or ResultSets.
Parameters:
  proc - the stored procedure to execute an ExecuteResult object
exception:
  SQLException - if an error occurs



callableStatementExecuteQuery
protected ControllerResultSet callableStatementExecuteQuery(StoredProcedure proc) throws SQLException(Code)
Call a stored procedure that returns a ResultSet.
Parameters:
  proc - the stored procedure call a java.sql.ResultSet value
exception:
  SQLException - if an error occurs



callableStatementExecuteUpdate
protected ExecuteUpdateResult callableStatementExecuteUpdate(StoredProcedure proc) throws SQLException(Code)
Call a stored procedure that performs an update.
Parameters:
  proc - the stored procedure call number of rows affected
exception:
  SQLException - if an error occurs



checkAdminAuthentication
public boolean checkAdminAuthentication(String adminLogin, String adminPassword)(Code)
Checks if a given admin login/password is ok.
Parameters:
  adminLogin - admin user login
Parameters:
  adminPassword - admin user password true if the login/password is known from theAuthenticationManager. Returns falseif no AuthenticationManager is defined.



checkAndAddVirtualDatabaseUser
public void checkAndAddVirtualDatabaseUser(VirtualDatabaseUser vdbUser)(Code)
Adds a new vdb user. Uses the vdb login/password as real user login/password. Only creates the user if vdb login/password are valid for all backends hosting the vdb.
Parameters:
  vdbUser - vdb user to be added.



checkUserAuthentication
public boolean checkUserAuthentication(String virtualLogin, String virtualPassword)(Code)
Checks if a given virtual login/password is ok.
Parameters:
  virtualLogin - the virtual user login
Parameters:
  virtualPassword - the virtual user password true if the login/password is known from theAuthenticationManager. Returns falseif no AuthenticationManager is defined.



cleanMonitoringData
public void cleanMonitoringData() throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.cleanMonitoringData



clearConnectionWarnings
public void clearConnectionWarnings(long connId) throws SQLException(Code)
Forwards call to clearWarnings() to the given persistent connections on each backend.
Parameters:
  connId - the persistent connection id to clear warnings from
exception:
  SQLException - if a database access error occurs



closePersistentConnection
public void closePersistentConnection(String login, long persistentConnectionId)(Code)
Close the given persistent connection.
Parameters:
  login - login to use to retrieve the right connection pool
Parameters:
  persistentConnectionId - id of the persistent connection to close



commit
public void commit(long transactionId, boolean logCommit, boolean emptyTransaction) throws SQLException(Code)
Commits a transaction given its id.
Parameters:
  transactionId - the transaction id
Parameters:
  logCommit - true if the commit should be logged in the recovery log
Parameters:
  emptyTransaction - true if this transaction has not executed anyrequest
exception:
  SQLException - if an error occurs



copyDump
public void copyDump(String dumpName, String remoteControllerName) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.copyDump(java.lang.Stringjava.lang.String)



copyLogFromCheckpoint
public void copyLogFromCheckpoint(String dumpName, String controllerName) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.copyLogFromCheckpoint(java.lang.Stringjava.lang.String)



decreaseCurrentNbOfThread
protected void decreaseCurrentNbOfThread()(Code)
Substract one to currentNbOfThreads. Warning! This method is not synchronized.



decreaseIdleThread
protected void decreaseIdleThread()(Code)
Remove an idle thread. Warning! This method must be called in a synchronized block on activeThreads.



deleteDump
public void deleteDump(String dumpName, boolean keepsFile) throws VirtualDatabaseException(Code)
Delete the dump entry associated to the dumpName.
If keepsFile is false, the dump file is also removed from the file system.
Parameters:
  dumpName - name of the dump entry to remove
Parameters:
  keepsFile - true if the dump should be also removedfrom the file system, false else
throws:
  VirtualDatabaseException - if an exception occured while removing thedump entry or the dump file



deleteLogUpToCheckpoint
public void deleteLogUpToCheckpoint(String checkpointName) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.deleteLogUpToCheckpoint(java.lang.String)



disableAllBackends
public void disableAllBackends(boolean forceEnable) throws VirtualDatabaseException(Code)
Prepare this virtual database for shutdown. This turns off all the backends by cutting communication from this database. This does not prevents other virtual database to use shared backends. This doesn't create checkpoints either.
Parameters:
  forceEnable - true if backend disabling must be forced, false forregular/clean disabling
throws:
  VirtualDatabaseException - if an error occurs



disableAllBackendsWithCheckpoint
public void disableAllBackendsWithCheckpoint(String checkpoint) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.disableAllBackendsWithCheckpoint(java.lang.String)



disableBackendWithCheckpoint
public void disableBackendWithCheckpoint(String backendName) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.disableBackendWithCheckpoint(String)



doGetStaticMetaData
public VirtualDatabaseStaticMetaData doGetStaticMetaData()(Code)

See Also:   VirtualDatabase.getStaticMetaData()



enableAllBackends
public void enableAllBackends() throws VirtualDatabaseException(Code)
Enable all the backends without any check.
throws:
  VirtualDatabaseException - if fails



enableAllBackendsFromCheckpoint
public void enableAllBackendsFromCheckpoint() throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.enableAllBackendsFromCheckpoint



enableBackendFromCheckpoint
public void enableBackendFromCheckpoint(String backendName, String checkpointName) throws VirtualDatabaseException(Code)
Enable the given backend from the given checkpoint. This method returns once the recovery is complete.
Parameters:
  backendName - backend to enable
Parameters:
  checkpointName - checkpoint to enable from
throws:
  VirtualDatabaseException - if an error occurs



enableBackendFromCheckpoint
public void enableBackendFromCheckpoint(String backendName) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.enableBackendFromCheckpoint(java.lang.String)



enforceTableExistenceIntoSchema
public boolean enforceTableExistenceIntoSchema()(Code)
Indicates if the virtual database requires that tables referenced in a query exist into the schema. This concerns only write queries. If true, queries containing references to tables that do not exist in the database schema will be rejected. Otherwise, queries will be executed against the backends using the conflicting queue. This is done to avoid unwanted cross-database queries to be executed on the cluster. enforceTableExistenceIntoSchema that is true if tables have to befound in the database schema to let a query to be executed againstbackends



equals
public boolean equals(Object other)(Code)
Two virtual databases are equal if they have the same name and group.
Parameters:
  other - the object to compare with true if the two virtual databases are equals



failoverForPersistentConnection
public void failoverForPersistentConnection(long persistentConnectionId)(Code)
Notify the failover of the given persistent connection (really useful for DistributedVirtualDatabase)
Parameters:
  persistentConnectionId - the persistent connection id



failoverForTransaction
public void failoverForTransaction(long currentTid)(Code)
Notify the failover of the given transaction (really useful for DistributedVirtualDatabase)
Parameters:
  currentTid - transaction id



forceDisableBackend
public void forceDisableBackend(String backendName) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.forceDisableBackend(String)



forceEnableAllBackendsFromCheckpoint
public void forceEnableAllBackendsFromCheckpoint(String checkpoint) throws VirtualDatabaseException(Code)
Prepare this virtual database for startup. This turns on all the backends from the given checkpoint. If the checkpoint is null or an empty String, the backends are enabled without further check else the backend states are overriden to use the provided checkpoint.
Parameters:
  checkpoint - checkpoint for recovery log
throws:
  VirtualDatabaseException - if fails



forceEnableBackend
public void forceEnableBackend(String backendName) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.forceEnableBackend(String)



getActiveThreads
public ArrayList getActiveThreads()(Code)
Returns the activeThreads list. ArrayList of VirtualDatabaseWorkerThread



getAllBackendNames
public ArrayList getAllBackendNames() throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.getAllBackendNames



getAndCheckBackend
public DatabaseBackend getAndCheckBackend(String backendName, int testEnable) throws VirtualDatabaseException(Code)
Find the DatabaseBackend corresponding to the given backend name and check if it is possible to disable this backend. In the case enable, this method also updates the virtual database schema by merging it with the one provided by this backend.
Parameters:
  backendName - backend to look for
Parameters:
  testEnable - NO_CHECK_BACKEND no check is done, CHECK_BACKEND_DISABLEcheck if it is possible to disable the backend,CHECK_BACKEND_ENABLE check if it is possible to enable the backend the backend to disable
throws:
  VirtualDatabaseException - if an error occurs



getAuthenticationManager
public AuthenticationManager getAuthenticationManager()(Code)
Returns the authentication manager of this virtual database. an AuthenticationManager instance



getAvailableDumps
public DumpInfo[] getAvailableDumps() throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.getAvailableDumps



getBackendInformation
public String getBackendInformation(String backendName) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.getBackendInformation(String)



getBackendSchema
public String getBackendSchema(String backendName) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.getBackendSchema(java.lang.String)



getBackendState
public String getBackendState(String backendName) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.getBackendState(java.lang.String)



getBackendStatistics
public BackendStatistics getBackendStatistics(String backendName) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.getBackendStatistics(java.lang.String)



getBackends
public ArrayList getBackends()(Code)
Return the list of all backends ArrayList of DatabaseBackend Objects



getBackuperNames
public String[] getBackuperNames()(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.getBackuperNames



getConnectionWarnings
public SQLWarning getConnectionWarnings(long connId) throws SQLException(Code)
Retrieves the warnings for the given connection on the first available backend
Parameters:
  connId - the persistent connection id to retrieve warnings from
exception:
  SQLException - if a database access error occurs or this method iscalled on a closed connection connection SQL warnings or null



getCurrentNbOfThreads
public int getCurrentNbOfThreads()(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.getCurrentNbOfThreads



getDatabaseName
public String getDatabaseName()(Code)
Gets the virtual database name to be used by the client (Sequoia driver) This method should be used for local references only (it is faster). For remote RMI calls, use VirtualDatabase.getVirtualDatabaseName() . the virtual database name
See Also:   VirtualDatabase.getVirtualDatabaseName



getDatabaseProductName
public String getDatabaseProductName()(Code)

See Also:   org.continuent.sequoia.driver.DatabaseMetaData.getDatabaseProductName



getDatabaseSchemaFromActiveBackends
public DatabaseSchema getDatabaseSchemaFromActiveBackends() throws SQLException(Code)
Get the current database schema from merging the schemas of all active backends. the current database schema dynamically gathered
throws:
  SQLException - if an error occurs



getDatabaseSchemaFromActiveBackendsAndRefreshDatabaseProductNames
public DatabaseSchema getDatabaseSchemaFromActiveBackendsAndRefreshDatabaseProductNames() throws SQLException(Code)
Get the current database schema from merging the schemas of all active backends. This is needed when a backend is disabled. the current database schema dynamically gathered
throws:
  SQLException - if an error occurs



getDistributionXml
protected String getDistributionXml()(Code)
Get the XML dump of the Distribution element if any. ""



getDumpFormatForBackuper
public String getDumpFormatForBackuper(String backuperName)(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.getDumpFormatForBackuper(java.lang.String)



getDynamicMetaData
public VirtualDatabaseDynamicMetaData getDynamicMetaData()(Code)

See Also:   org.continuent.sequoia.driver.DatabaseMetaData associated metada for this database



getFirstAvailableBackend
DatabaseBackend getFirstAvailableBackend()(Code)
Retrieves the first available backend from this virtual database the first available backend or null if no backend enabled is found



getIdleThreads
public int getIdleThreads()(Code)
Returns the number of idle worker threads. Warning! This method must be called in a synchronized block on activeThreads. int number of idle worker threads



getLogger
final public Trace getLogger()(Code)
Returns the logger value. Returns the logger.



getMaxNbOfConnections
public int getMaxNbOfConnections()(Code)
Returns the maxNbOfConnections. int



getMaxNbOfThreads
public int getMaxNbOfThreads()(Code)
Returns the maxNbOfThreads. int maximum number of threads



getMaxThreadIdleTime
public long getMaxThreadIdleTime()(Code)
Returns the maxThreadIdleTime. long maximum thread idle time in ms



getMinNbOfThreads
public int getMinNbOfThreads()(Code)
Returns the minNbOfThreads. int minimum number of threads



getNextConnectionId
public long getNextConnectionId()(Code)
Return the next connection identifier (monotically increasing number). a connection identifier



getNextRequestId
public long getNextRequestId()(Code)
Return the next request identifier (monotically increasing number). a request identifier



getNumberOfEnabledBackends
protected int getNumberOfEnabledBackends() throws VirtualDatabaseException(Code)



getNumberOfSavepointsInTransaction
public int getNumberOfSavepointsInTransaction(long tId)(Code)
Returns the number of savepoints that are defined for a given transaction by asking to the request manager.
Parameters:
  tId - the transaction id the number of savepoints that are defined in the transaction whoseid is tId



getPendingConnections
public ArrayList getPendingConnections()(Code)
Returns the pendingConnections. ArrayList



getPreparedStatementGetMetaData
public ControllerResultSet getPreparedStatementGetMetaData(AbstractRequest request) throws SQLException(Code)
Return a ControllerResultSet containing the PreparedStatement metaData of the given sql template
Parameters:
  request - the request containing the sql template an empty ControllerResultSet with the metadata
throws:
  SQLException - if a database error occurs



getRequestManager
public RequestManager getRequestManager()(Code)
Gets the request manager associated to this database. a RequestManager instance



getSQLMonitor
public SQLMonitoring getSQLMonitor()(Code)
Returns the current SQL monitor a SQLMonitoring instance or null if no monitor isdefined



getSqlShortFormLength
public int getSqlShortFormLength()(Code)
Return the sql short form length to use when reporting an error. sql short form length
See Also:   org.continuent.sequoia.controller.requests.AbstractRequest.getSqlShortForm(int)



getStaticMetaData
public VirtualDatabaseStaticMetaData getStaticMetaData()(Code)
Get the whole static metadata for this virtual database. A new empty metadata object is created if there was none yet. It will be filled later by gatherStaticMetadata() when the backend is enabled. Virtual database static metadata



getTotalOrderQueue
public LinkedList getTotalOrderQueue()(Code)
Returns the totalOrderQueue value. Returns the totalOrderQueue.



getVirtualDatabaseName
public String getVirtualDatabaseName()(Code)
Gets the virtual database name to be used by the client (Sequoia driver) the virtual database name



getVirtualDatabaseWorkerThreadForPersistentConnection
public VirtualDatabaseWorkerThread getVirtualDatabaseWorkerThreadForPersistentConnection(long persistentConnectionId)(Code)
Return the VirtualDatabaseWorkerThread that is currently executing the persistent connection identified by the provided id.
Parameters:
  persistentConnectionId - the transaction id to look for the corresponding VirtualDatabaseWorkerThread or null if none isfound



getVirtualDatabaseWorkerThreadForTransaction
public VirtualDatabaseWorkerThread getVirtualDatabaseWorkerThreadForTransaction(long transactionId)(Code)
Return the VirtualDatabaseWorkerThread that is currently executing the transaction identified by the provided id.
Parameters:
  transactionId - the transaction id to look for the corresponding VirtualDatabaseWorkerThread or null if none isfound



getXml
public String getXml()(Code)
Retrieves this VirtualDatabase object in xml format xml formatted string that conforms to sequoia.dtd



hasPersistentConnection
public boolean hasPersistentConnection(long persistentConnectionId)(Code)
Returns true if the virtual database has opened the given persistent connection.
Parameters:
  persistentConnectionId - id of the persistent connection to check true if the connection is open



hasRecoveryLog
public boolean hasRecoveryLog()(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.hasRecoveryLog



hasResultCache
public boolean hasResultCache()(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.hasResultCache



incrementCurrentNbOfThread
protected void incrementCurrentNbOfThread()(Code)
Adds one to currentNbOfThreads. Warning! This method is not synchronized.



incrementIdleThreadCount
protected void incrementIdleThreadCount()(Code)
Method add an idle thread. Warning! This method must be called in a synchronized block on activeThreads.



initializeFromBackend
public void initializeFromBackend(String databaseBackendName, boolean force) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.initializeFromBackend(java.lang.Stringboolean)



isDistributed
public boolean isDistributed()(Code)
Is this virtual database distributed ? false



isDumpNameAvailable
public boolean isDumpNameAvailable(String tentativeDumpName)(Code)
Checks if the dump name is available. If the dumpName is already taken by an existing dump, return false; else return true
Parameters:
  tentativeDumpName - tentative dump name we want to check availability true is the name is available, falseelse.



isPoolConnectionThreads
public boolean isPoolConnectionThreads()(Code)
Returns the poolConnectionThreads. boolean true if threads are pooled



isRejectingNewTransaction
public boolean isRejectingNewTransaction()(Code)



isResyncing
protected boolean isResyncing()(Code)
Returns true if this vdb is resynching. This can only happen for distributed vdbs that have recovery logs. true if db is resynching



isShuttingDown
public boolean isShuttingDown()(Code)
Return true if this database is shutting down. true if this database is shutting down.



isValidUserForAllBackends
public boolean isValidUserForAllBackends(VirtualDatabaseUser vdbUser)(Code)
Checks if a vdb user is valid as a user for allbackends.
Parameters:
  vdbUser - vdb user to be checked. true if vdb user is valid for all backends, false otherwise.



openPersistentConnection
public void openPersistentConnection(String login, long persistentConnectionId) throws SQLException(Code)
Open the given persistent connection.
Parameters:
  login - login to use to retrieve the right connection pool
Parameters:
  persistentConnectionId - id of the persistent connection to open
throws:
  SQLException - if an error occurs while opening the connection



performAddVirtualDatabaseUser
public void performAddVirtualDatabaseUser(VirtualDatabaseUser vdbUser) throws SQLException(Code)
Adds new vdb user and its corresponding connection managers.
Parameters:
  vdbUser - vdb user to be added.
throws:
  SQLException - thrown if problem occurred when adding connectionmanager



performRemoveVirtualDatabaseUser
public void performRemoveVirtualDatabaseUser(VirtualDatabaseUser vdbUser)(Code)
Removes vdb user and its corresponding connection managers.
Parameters:
  vdbUser - vdb user to be removed.



releaseReadLockBackendLists
final public void releaseReadLockBackendLists()(Code)
Releases the read lock on the backend lists (both enabled and disabled backends). This should be called after traversing the backend ArrayList.



releaseSavepoint
public void releaseSavepoint(long transactionId, String savepointName) throws SQLException(Code)
Releases a savepoint given its name from a transaction given its id.
Parameters:
  transactionId - the transaction id
Parameters:
  savepointName - the name of the savepoint
exception:
  SQLException - if an error occurs



removeAdminOperation
protected boolean removeAdminOperation(AbstractAdminOperation operation)(Code)
Remove a currently executing admin operation. Returns true if the command was successfully removed from the list.
Parameters:
  operation - the admin operation to remove. true if operation was found and removed from the list



removeBackend
public void removeBackend(String backend) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.removeBackend(java.lang.String)



removeBackend
public void removeBackend(DatabaseBackend db) throws VirtualDatabaseException(Code)
Remove a backend from this virtual database.
Parameters:
  db - the database backend to remove
throws:
  VirtualDatabaseException - if an error occurs



removeCheckpoint
public void removeCheckpoint(String checkpointName) throws VirtualDatabaseException(Code)
Remove a checkpoint from the recovery log of this virtual database
Parameters:
  checkpointName - to remove
throws:
  VirtualDatabaseException - if an error occurs



replicateBackend
public void replicateBackend(String backendName, String newBackendName, Map parameters) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.replicateBackend(java.lang.Stringjava.lang.Stringjava.util.Map)



restoreDumpOnBackend
public void restoreDumpOnBackend(String databaseBackendName, String login, String password, String dumpName, ArrayList tables) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.restoreDumpOnBackend(StringStringStringStringArrayList)



retrieveBackendsData
public String[][] retrieveBackendsData() throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.retrieveBackendsData



rollback
public void rollback(long transactionId, boolean logRollback) throws SQLException(Code)
Rollbacks a transaction given its id.
Parameters:
  transactionId - the transaction id
Parameters:
  logRollback - true if the rollback should be logged in the recoverylog
exception:
  SQLException - if an error occurs



rollback
public void rollback(long transactionId, String savepointName) throws SQLException(Code)
Rollbacks a transaction given its id to a savepoint given its name
Parameters:
  transactionId - the transaction id
Parameters:
  savepointName - the name of the savepoint
exception:
  SQLException - if an error occurs



sendJmxNotification
protected void sendJmxNotification(String type, String message)(Code)
Sends a JMX Notification on behalf of the MBean associated with this virtual database
Parameters:
  type - type of the JMX notification
Parameters:
  message - message associated with the notification
See Also:   SequoiaNotificationList



setAuthenticationManager
public void setAuthenticationManager(AuthenticationManager authenticationManager)(Code)
Sets the authentication manager for this virtual database.
Parameters:
  authenticationManager - the AuthenticationManager toset



setBackendLastKnownCheckpoint
public void setBackendLastKnownCheckpoint(String backendName, String checkpoint) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.setBackendLastKnownCheckpoint



setMaxNbOfConnections
public void setMaxNbOfConnections(int maxNbOfConnections)(Code)
Sets the maxNbOfConnections.
Parameters:
  maxNbOfConnections - The maxNbOfConnections to set



setMaxNbOfThreads
public void setMaxNbOfThreads(int maxNbOfThreads)(Code)
Sets the maxNbOfThreads.
Parameters:
  maxNbOfThreads - The maxNbOfThreads to set



setMaxThreadIdleTime
public void setMaxThreadIdleTime(long maxThreadIdleTime)(Code)
Sets the maxThreadIdleTime.
Parameters:
  maxThreadIdleTime - The maxThreadIdleTime to set



setMinNbOfThreads
public void setMinNbOfThreads(int minNbOfThreads)(Code)
Sets the minNbOfThreads.
Parameters:
  minNbOfThreads - The minNbOfThreads to set



setMonitoringToActive
public void setMonitoringToActive(boolean active) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.setMonitoringToActive(boolean)



setNotificationBroadcasterSupport
public void setNotificationBroadcasterSupport(NotificationBroadcasterSupport notificationBroadcasterSupport)(Code)
Sets the NotificationBroadcasterSupport associated with the MBean managing this virtual database.
Parameters:
  notificationBroadcasterSupport - the notificationBroadcasterSupporassociated with the mbean managing this virtual database



setPoolConnectionThreads
public void setPoolConnectionThreads(boolean poolConnectionThreads)(Code)
Sets the poolConnectionThreads.
Parameters:
  poolConnectionThreads - The poolConnectionThreads to set



setRejectingNewTransaction
public void setRejectingNewTransaction(boolean canAcceptNewTransaction)(Code)



setRequestManager
public void setRequestManager(RequestManager requestManager)(Code)
Sets a new request manager for this database.
Parameters:
  requestManager - the new request manager.



setSQLMonitor
public void setSQLMonitor(SQLMonitoring sqlMonitor)(Code)
Sets a new SQL Monitor
Parameters:
  sqlMonitor - the new SQL monitor



setSavepoint
public int setSavepoint(long transactionId) throws SQLException(Code)
Sets a unnamed savepoint to a transaction given its id.
Parameters:
  transactionId - the transaction id the savepoint id
exception:
  SQLException - if an error occurs



setSavepoint
public void setSavepoint(long transactionId, String name) throws SQLException(Code)
Sets a savepoint given its desired name to a transaction given its id.
Parameters:
  transactionId - the transaction id
Parameters:
  name - the desired name of the savepoint
exception:
  SQLException - if an error occurs



setShutdownCheckpoint
public void setShutdownCheckpoint()(Code)
Sets a checkpoint indicating that this vdb has shutdown.



setShuttingDown
public void setShuttingDown(boolean shuttingDown)(Code)
Set the VDB shutting down state
Parameters:
  shuttingDown - TRUE when vdb is shutting down



setStaticDatabaseSchema
public void setStaticDatabaseSchema(DatabaseSchema schema)(Code)
Sets a new static database schema for this database if no one exist or merge the given schema to the existing one. A static schema can only be replaced by another static schema.
Parameters:
  schema - the new database shema



shutdown
public void shutdown(int level)(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.shutdown(int)



statementExecute
protected ExecuteResult statementExecute(AbstractRequest request) throws SQLException(Code)
Execute a request using Statement.execute(). Handle this as a stored procedure for which we have no metadata information.
Parameters:
  request - the request to execute an ExecuteResult object
exception:
  SQLException - if an error occurs



statementExecuteQuery
protected ControllerResultSet statementExecuteQuery(SelectRequest request) throws SQLException(Code)
Performs a read request and returns the reply.
Parameters:
  request - the request to execute a ControllerResultSet value
exception:
  SQLException - if the request fails



statementExecuteUpdate
protected ExecuteUpdateResult statementExecuteUpdate(AbstractWriteRequest request) throws SQLException(Code)
Performs a write request and returns the number of rows affected.
Parameters:
  request - the request to execute number of rows affected
exception:
  SQLException - if the request fails



statementExecuteUpdateWithKeys
protected GeneratedKeysResult statementExecuteUpdateWithKeys(AbstractWriteRequest request) throws SQLException(Code)
Performs a write request and returns the auto generated keys.
Parameters:
  request - the request to execute auto generated keys
exception:
  SQLException - if the request fails



storeBackendsInfo
public void storeBackendsInfo()(Code)
Write the checkpoints for all backends on the recovery log



transferBackend
public void transferBackend(String backend, String controllerDestination) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.transferBackend(java.lang.Stringjava.lang.String)



transferDump
public void transferDump(String dumpName, String remoteControllerName, boolean noCopy) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.transferDump(java.lang.Stringjava.lang.Stringboolean)



updateDumpPath
public void updateDumpPath(String dumpName, String newPath) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.updateDumpPath(java.lang.Stringjava.lang.String)



useStaticResultSetMetaData
final public boolean useStaticResultSetMetaData()(Code)
Returns the useStaticResultSetMetaData value. Returns the useStaticResultSetMetaData.



viewAllClientNames
public ArrayList viewAllClientNames()(Code)
Get all users connected to that database an ArrayList of strings containing the clientsusername



viewBackendInformation
public String[] viewBackendInformation(String backendName) throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.viewBackendInformation(java.lang.String)



viewCheckpointNames
public ArrayList viewCheckpointNames()(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.viewCheckpointNames



viewControllerList
public String[] viewControllerList()(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.viewControllerList



viewGroupBackends
public Hashtable viewGroupBackends() throws VirtualDatabaseException(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.viewGroupBackends



viewOwningController
public String viewOwningController()(Code)

See Also:   org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean.viewOwningController



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.