| org.continuent.sequoia.controller.jmx.AbstractStandardMBean org.continuent.sequoia.controller.requestmanager.RequestManager
All known Subclasses: org.continuent.sequoia.controller.requestmanager.distributed.DistributedRequestManager,
Method Summary | |
public void | abort(long transactionId, boolean logAbort, boolean forceAbort) Abort a transaction that has been started but in which no query was
executed. | public void | addSavepoint(Long tid, String savepointName) | public void | backupBackend(DatabaseBackend backend, String login, String password, String dumpName, String backuperName, String path, ArrayList tables) Create a backup from the content of a backend. | public long | begin(String login, boolean isPersistentConnection, long persistentConnectionId) Begin a new transaction and return the corresponding transaction
identifier. | public ExecuteResult | callableStatementExecute(StoredProcedure proc) Execute a call to CallableStatement.execute() and returns a suite of
updateCount and/or ResultSets. | public ControllerResultSet | callableStatementExecuteQuery(StoredProcedure proc) Call a stored procedure that returns a ResultSet. | public ExecuteUpdateResult | callableStatementExecuteUpdate(StoredProcedure proc) Call a stored procedure that performs an update. | public void | closePersistentConnection(String login, long persistentConnectionId) Close the given persistent connection. | public void | commit(long transactionId, boolean logCommit, boolean emptyTransaction) Commit a transaction given its id. | public void | completeTransaction(Long tid) Complete the transaction by removing it from the transactionMetaDatas. | public void | disableBackend(DatabaseBackend db, boolean forceDisable) Disable a backend that is currently enabled on this virtual database. | public void | disableBackendWithCheckpoint(DatabaseBackend db, String checkpointName) The backend must belong to this virtual database and be in the enabled
state. | public void | disableBackendsWithCheckpoint(ArrayList backendInfos, String checkpointName) Disable a list of backends. | public void | doBegin(String login, long tid, boolean isPersistentConnection, long persistentConnectionId) Begins a new transaction for the given login and
tid . | public void | enableBackend(DatabaseBackend db) Enable a backend that has been previously added to this virtual database
and that is in the disabled state. | public RecoverThread | enableBackendFromCheckpoint(DatabaseBackend db, String checkpointName) The backend must have been previously added to this virtual database and be
in the disabled state.
All the queries since the given checkpoint are played and the backend state
is set to enabled when it is completely synchronized.
Note that the job is performed in background by a
RecoverThread . | public String | getAssociatedString() | public BackendStateListener | getBackendStateListener() Returns the backendStateListener value. | public BackupManager | getBackupManager() Returns the backupManager value. | public long | getBeginTimeout() Returns the beginTimeout value. | public int | getCacheParsingranularity() Returns the cacheParsingranularity value. | public long | getCommitTimeout() Returns the commitTimeout value. | public synchronized DatabaseSchema | getDatabaseSchema() Get the DatabaseSchema used by this Request Manager. | public AbstractLoadBalancer | getLoadBalancer() Get the Request Load Balancer used in this Request Controller. | public MetadataCache | getMetadataCache() Returns the metadataCache value. | public long | getNextRequestId() Return the next request identifier (monotically increasing number). | public int | getNumberOfSavepointsInTransaction(long tId) | public void | getParsingFromCacheOrParse(AbstractRequest request) Get the parsing from the parsing cache or parse the query. | public ControllerResultSet | getPreparedStatementGetMetaData(AbstractRequest request) | public RecoveryLog | getRecoveryLog() Returns the Recovery Log Manager. | public int | getRequiredParsingGranularity() Returns the requiredParsingGranularity value. | public AbstractResultCache | getResultCache() Get the result cache (if any) used in this Request Manager. | public long | getRollbackTimeout() Returns the rollbackTimeout value. | public AbstractScheduler | getScheduler() Get the Request Scheduler (if any) used in this Request Controller. | public int | getSchedulerParsingranularity() Returns the schedulerParsingranularity value. | public TransactionMetaData | getTransactionMetaData(Long tid) Get the TransactionMetaData for the given transaction id. | public VirtualDatabase | getVirtualDatabase() Returns the vdb value. | public String | getXml() | public boolean | hasPersistentConnection(long persistentConnectionId) Returns true if the virtual database has opened the given persistent
connection. | public boolean | hasSavepoint(Long tid, String savepointName) | public void | initBackendsLastKnownCheckpointFromRecoveryLog() Retrieve the last known checkpoint from the recovery log and set it for
each backend. | public void | initializeRequestId(long requestId) Initialize the request id with the given value (usually retrieved from the
recovery log). | public boolean | isCaseSensitiveParsing() Returns the isCaseSensitiveParsing value. | public boolean | isStaticSchema() Returns the schemaIsStatic value. | public ExecuteResult | loadBalanceCallableStatementExecute(StoredProcedure proc) Execute a write stored procedure on the load balancer. | public ControllerResultSet | loadBalanceCallableStatementExecuteQuery(StoredProcedure proc) Execute a read stored procedure on the load balancer. | public ExecuteUpdateResult | loadBalanceCallableStatementExecuteUpdate(StoredProcedure proc) Execute a write stored procedure on the load balancer. | public ExecuteResult | loadBalanceStatementExecute(AbstractRequest request) Execute a request using Statement.execute() on the load balancer. | public ExecuteUpdateResult | loadBalanceStatementExecuteUpdate(AbstractWriteRequest request) Send the given query to the load balancer. | public GeneratedKeysResult | loadBalanceStatementExecuteUpdateWithKeys(AbstractWriteRequest request) Send the given query to the load balancer. | public void | logLazyTransactionBegin(long transactionId) Log the begin of a transaction that is started lazily. | public synchronized void | mergeDatabaseSchema(DatabaseSchema backendSchema) Merge the given schema with the existing database schema. | public void | openPersistentConnection(String login, long persistentConnectionId, DistributedOpenPersistentConnection dmsg) Open the given persistent connection. | public String | parseSqlRequest(String sqlRequest, String lineSeparator) | public void | releaseSavepoint(long transactionId, String name) Releases a savepoint given its name from a transaction given its id. | public void | removeCheckpoint(String checkpointName) | public void | removeSavepoint(Long tid, String savepointName) | public void | removeSavepoints(Long tid, String savepointName) | public void | restoreBackendFromBackupCheckpoint(DatabaseBackend backend, String login, String password, String dumpName, ArrayList tables) Restore a dump on a specific backend. | public void | resumeActivity() Resume all transactions, writes and persistent connections. | public void | rollback(long transactionId, boolean logRollback) Rollback a transaction given its id. | public void | rollback(long transactionId, String savepointName) Rollback a transaction given its id to a savepoint given its name. | public void | scheduleExecWriteRequest(AbstractWriteRequest request) Schedule a request for execution. | public void | scheduleStoredProcedure(StoredProcedure proc) This method does some sanity check on the given stored procedure and then
tries to schedule it. | public void | setBackupManager(BackupManager currentBackupManager) | public void | setCacheParsingranularity(int cacheParsingranularity) Sets the cacheParsingranularity value. | public void | setCaseSensitiveParsing(boolean isCaseSensitiveParsing) Sets the parsing case sensitivity. | public synchronized void | setDatabaseSchema(DatabaseSchema schema, boolean isStatic) Sets the DatabaseSchema to be able to parse the requests and
find dependencies. | public void | setLoadBalancer(AbstractLoadBalancer loadBalancer) Set the Request Load Balancer to use in this Request Controller. | public void | setMetadataCache(MetadataCache metadataCache) Sets the metadataCache value. | public void | setParsingCache(ParsingCache parsingCache) Sets the ParsingCache. | public void | setRecoveryLog(RecoveryLog recoveryLog) Sets the Recovery Log Manager. | public void | setResultCache(AbstractResultCache cache) Set the Request Cache to use in this Request Controller. | public int | setSavepoint(long transactionId) Sets a unnamed savepoint to a transaction given its id. | public void | setSavepoint(long transactionId, String name) Sets a savepoint given its desired name to a transaction given its id. | public void | setScheduler(AbstractScheduler scheduler) Set the Request Scheduler to use in this Request Controller. | public void | setSchedulerParsingranularity(int schedulerParsingranularity) Sets the schedulerParsingranularity value. | public synchronized void | setSchemaIsDirty(boolean schemaIsDirty) Sets the schemaIsDirty value if the backend schema needs to be refreshed. | public void | setStaticSchema(boolean schemaIsStatic) Sets the schemaIsStatic value. | public ExecuteResult | statementExecute(AbstractRequest request) Execute a call to CallableStatement.execute() and returns a suite of
updateCount and/or ResultSets. | public ControllerResultSet | statementExecuteQuery(SelectRequest request) Perform a read request and return the reply. | public ExecuteUpdateResult | statementExecuteUpdate(AbstractWriteRequest request) Perform a write request and return the number of rows affected Call first
the scheduler (if defined), then notify the cache (if defined) and finally
call the load balancer. | public GeneratedKeysResult | statementExecuteUpdateWithKeys(AbstractWriteRequest request) Perform a write request and return the auto generated keys. | public void | storeBackendsInfo(String databaseName, ArrayList backends) | public void | suspendActivity() Suspend all transactions, writes and persistent connections. | public void | updateAndNotifyExecWriteRequest(AbstractWriteRequest request, int updateCount) Update the recovery log, cache, update the database schema if needed and
finally notify the scheduler. | public void | updateRecoveryLogFlushCacheAndRefreshSchema(StoredProcedure proc) Update the recovery log with successful completion of the query, flush the
cache and force schema refresh if needed. |
backupManager | protected BackupManager backupManager(Code) | | The backup manager responsible for backup and restore of backends
|
beginTimeout | protected long beginTimeout(Code) | | begin timeout in ms
|
commitTimeout | protected long commitTimeout(Code) | | commit timeout in ms
|
endUserLogger | protected static Trace endUserLogger(Code) | | |
requiredParsingGranularity | protected int requiredParsingGranularity(Code) | | |
rollbackTimeout | protected long rollbackTimeout(Code) | | rollback timeout in ms
|
schedulerParsingranularity | protected int schedulerParsingranularity(Code) | | |
tidSavepoints | protected Hashtable tidSavepoints(Code) | | Hashtable<Long, String>, the Long being a transaction
ID and its corresponding String being the name of a
savepoint.
|
transactionMetaDatas | protected Hashtable transactionMetaDatas(Code) | | Hashtable<Long, TransactionMetaData>, the Long key is
the same transaction ID as the transactionId field of its
corresponding TransactionMetaData value.
|
RequestManager | public RequestManager(VirtualDatabase vdb, AbstractScheduler scheduler, AbstractResultCache cache, AbstractLoadBalancer loadBalancer, RecoveryLog recoveryLog, long beginTimeout, long commitTimeout, long rollbackTimeout) throws SQLException, NotCompliantMBeanException(Code) | | Creates a new RequestManager instance.
Parameters: vdb - the virtual database this request manager belongs to Parameters: scheduler - the Request Scheduler to use Parameters: cache - a Query Cache implementation Parameters: loadBalancer - the Request Load Balancer to use Parameters: recoveryLog - the Log Recovery to use Parameters: beginTimeout - timeout in seconds for begin Parameters: commitTimeout - timeout in seconds for commit Parameters: rollbackTimeout - timeout in seconds for rollback throws: SQLException - if an error occurs throws: NotCompliantMBeanException - if the MBean is not JMX compliant |
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 |
addSavepoint | public void addSavepoint(Long tid, String savepointName)(Code) | | Adds a given savepoint to a given transaction
Parameters: tid - transaction id Parameters: savepointName - name of the savepoint |
backupBackend | public void backupBackend(DatabaseBackend backend, String login, String password, String dumpName, String backuperName, String path, ArrayList tables) throws SQLException(Code) | | Create a backup from the content of a backend.
Parameters: backend - the target backend to backup Parameters: login - the login to use to connect to the database for the backupoperation Parameters: password - the password to use to connect to the database for thebackup operation Parameters: dumpName - the name of the dump to create Parameters: backuperName - the logical name of the backuper to use Parameters: path - the path where to store the dump Parameters: tables - the list of tables to backup, null means all tables throws: SQLException - if the backup fails |
begin | public long begin(String login, boolean isPersistentConnection, long persistentConnectionId) throws SQLException(Code) | | Begin a new transaction and return the corresponding transaction
identifier. This method is called from the driver when setAutoCommit(false)
is called.
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 long a unique transaction identifier throws: SQLException - if an error occurs See Also: RequestManager.logLazyTransactionBegin(long) |
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) | | Commit 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 throws: SQLException - if an error occurs |
completeTransaction | public void completeTransaction(Long tid)(Code) | | Complete the transaction by removing it from the transactionMetaDatas.
Parameters: tid - transaction id |
disableBackend | public void disableBackend(DatabaseBackend db, boolean forceDisable) throws SQLException(Code) | | Disable a backend that is currently enabled on this virtual database.
The backend is disabled without further check.
The load balancer disabled method is called on the specified backend.
Parameters: db - The database backend to disable Parameters: forceDisable - true if disabling must be forced on the backend throws: SQLException - if an error occurs |
disableBackendWithCheckpoint | public void disableBackendWithCheckpoint(DatabaseBackend db, String checkpointName) throws SQLException(Code) | | The backend must belong to this virtual database and be in the enabled
state. A checkpoint is stored with the given name and the backend is set to
the disabling state. The method then wait for all in-flight transactions to
complete before disabling completely the backend and storing its last known
checkpoint (upon success only).
Parameters: db - The database backend to disable Parameters: checkpointName - The checkpoint name to store throws: SQLException - if an error occurs |
disableBackendsWithCheckpoint | public void disableBackendsWithCheckpoint(ArrayList backendInfos, String checkpointName) throws SQLException(Code) | | Disable a list of backends. Only to store only one checkpoint, and to
disable all the backends at the same time so the the system is in a
coherent state. Consider only the backends that were enabled. The others
are left in the state they were before.
Parameters: backendInfos - a List of BackendInfo to disable Parameters: checkpointName - to store throws: SQLException - if an error occurs |
doBegin | public void doBegin(String login, long tid, boolean isPersistentConnection, long persistentConnectionId) throws SQLException(Code) | | Begins a new transaction for the given login and
tid . Informs the loadbalancer and the scheduler about this
begun transaction.
Parameters: login - the login used by the connection Parameters: tid - the tid associed with the transaction to begin 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 throws: SQLException - if an error occurs |
enableBackend | public void enableBackend(DatabaseBackend db) throws SQLException(Code) | | Enable a backend that has been previously added to this virtual database
and that is in the disabled state.
The backend is enabled without further check.
The enableBackend method of the load balancer is called.
Parameters: db - The database backend to enable throws: SQLException - if an error occurs |
enableBackendFromCheckpoint | public RecoverThread enableBackendFromCheckpoint(DatabaseBackend db, String checkpointName) throws SQLException(Code) | | The backend must have been previously added to this virtual database and be
in the disabled state.
All the queries since the given checkpoint are played and the backend state
is set to enabled when it is completely synchronized.
Note that the job is performed in background by a
RecoverThread . You can synchronize on thread termination if
you need to wait for completion of this task and listen to JMX
notifications for the success status.
Parameters: db - The database backend to enable Parameters: checkpointName - The checkpoint name to restart from the JDBC reocver thread synchronizing the backend throws: SQLException - if an error occurs |
getBackendStateListener | public BackendStateListener getBackendStateListener()(Code) | | Returns the backendStateListener value.
Returns the backendStateListener. |
getBackupManager | public BackupManager getBackupManager()(Code) | | Returns the backupManager value.
Returns the backupManager. |
getBeginTimeout | public long getBeginTimeout()(Code) | | Returns the beginTimeout value.
Returns the beginTimeout. |
getCacheParsingranularity | public int getCacheParsingranularity()(Code) | | Returns the cacheParsingranularity value.
Returns the cacheParsingranularity. |
getCommitTimeout | public long getCommitTimeout()(Code) | | Returns the commitTimeout value.
Returns the commitTimeout. |
getDatabaseSchema | public synchronized DatabaseSchema getDatabaseSchema()(Code) | | Get the DatabaseSchema used by this Request Manager.
a DatabaseSchema value |
getLoadBalancer | public AbstractLoadBalancer getLoadBalancer()(Code) | | Get the Request Load Balancer used in this Request Controller.
an AbstractLoadBalancer value |
getMetadataCache | public MetadataCache getMetadataCache()(Code) | | Returns the metadataCache value.
Returns the metadataCache. |
getNextRequestId | public long getNextRequestId()(Code) | | Return the next request identifier (monotically increasing number).
a request identifier |
getNumberOfSavepointsInTransaction | public int getNumberOfSavepointsInTransaction(long tId)(Code) | | Returns the number of savepoints that are defined for a given transaction
Parameters: tId - the transaction id the number of savepoints that are defined in the transaction whoseid is tId |
getParsingFromCacheOrParse | public void getParsingFromCacheOrParse(AbstractRequest request) throws SQLException(Code) | | Get the parsing from the parsing cache or parse the query.
Parameters: request - the request to be parsed (request will be parsed after thiscall) throws: SQLException - if an error occurs during parsing |
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 |
getRecoveryLog | public RecoveryLog getRecoveryLog()(Code) | | Returns the Recovery Log Manager.
RecoveryLog the current recovery log (null if none) |
getRequiredParsingGranularity | public int getRequiredParsingGranularity()(Code) | | Returns the requiredParsingGranularity value.
Returns the requiredParsingGranularity. |
getResultCache | public AbstractResultCache getResultCache()(Code) | | Get the result cache (if any) used in this Request Manager.
an AbstractResultCache value or null if no ReqsultCache has been defined |
getRollbackTimeout | public long getRollbackTimeout()(Code) | | Returns the rollbackTimeout value.
Returns the rollbackTimeout. |
getScheduler | public AbstractScheduler getScheduler()(Code) | | Get the Request Scheduler (if any) used in this Request Controller.
an AbstractScheduler value or null if no RequestScheduler has been defined |
getSchedulerParsingranularity | public int getSchedulerParsingranularity()(Code) | | Returns the schedulerParsingranularity value.
Returns the schedulerParsingranularity. |
getTransactionMetaData | public TransactionMetaData getTransactionMetaData(Long tid) throws SQLException(Code) | | Get the TransactionMetaData for the given transaction id.
Parameters: tid - transaction id the TransactionMetaData throws: SQLException - if no marker has been found for this transaction |
getVirtualDatabase | public VirtualDatabase getVirtualDatabase()(Code) | | Returns the vdb value.
Returns the vdb. |
getXml | public String getXml()(Code) | | Get xml information about this Request Manager
String in xml formatted text |
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 |
hasSavepoint | public boolean hasSavepoint(Long tid, String savepointName)(Code) | | Check if a given savepoint has been set for a given transaction
Parameters: tid - transaction id Parameters: savepointName - name of the savepoint true if the savepoint exists |
initBackendsLastKnownCheckpointFromRecoveryLog | public void initBackendsLastKnownCheckpointFromRecoveryLog()(Code) | | Retrieve the last known checkpoint from the recovery log and set it for
each backend.
|
initializeRequestId | public void initializeRequestId(long requestId)(Code) | | Initialize the request id with the given value (usually retrieved from the
recovery log).
Parameters: requestId - new current request identifier |
isCaseSensitiveParsing | public boolean isCaseSensitiveParsing()(Code) | | Returns the isCaseSensitiveParsing value.
Returns the isCaseSensitiveParsing. |
isStaticSchema | public boolean isStaticSchema()(Code) | | Returns the schemaIsStatic value.
Returns the schemaIsStatic. |
logLazyTransactionBegin | public void logLazyTransactionBegin(long transactionId) throws SQLException(Code) | | Log the begin of a transaction that is started lazily. In fact, we just log
the begin when we execute the first write request in a transaction to
prevent logging begin/commit for read-only transactions. This also prevents
a problem with backends that are disabled with a checkpoint when no request
has been played in the transaction but the begin statement has already been
logged. In that case, the transaction would not be properly replayed at
restore time.
Parameters: transactionId - the transaction id begin to log throws: SQLException - if an error occurs |
mergeDatabaseSchema | public synchronized void mergeDatabaseSchema(DatabaseSchema backendSchema)(Code) | | Merge the given schema with the existing database schema.
Parameters: backendSchema - The virtual database schema to merge. |
openPersistentConnection | public void openPersistentConnection(String login, long persistentConnectionId, DistributedOpenPersistentConnection dmsg) 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 Parameters: dmsg - message in the total order queue if applicable (null otherwise) throws: SQLException - An exception can be thrown when it failed to open aconnection |
releaseSavepoint | public void releaseSavepoint(long transactionId, String name) throws SQLException(Code) | | Releases a savepoint given its name from a transaction given its id.
Parameters: transactionId - the transaction id Parameters: name - the name of the savepoint exception: SQLException - if an error occurs |
removeCheckpoint | public void removeCheckpoint(String checkpointName)(Code) | | Remove a checkpoint and corresponding entries from the log table
Parameters: checkpointName - to remove |
removeSavepoint | public void removeSavepoint(Long tid, String savepointName)(Code) | | Removes a given savepoint for a given transaction
Parameters: tid - transaction id Parameters: savepointName - name of the savepoint |
removeSavepoints | public void removeSavepoints(Long tid, String savepointName)(Code) | | Removes all the savepoints set after a given savepoint for a given
transaction
Parameters: tid - transaction id Parameters: savepointName - name of the savepoint |
restoreBackendFromBackupCheckpoint | public void restoreBackendFromBackupCheckpoint(DatabaseBackend backend, String login, String password, String dumpName, ArrayList tables) throws BackupException(Code) | | Restore a dump on a specific backend. The proper Backuper is retrieved
automatically according to the dump format stored in the recovery log dump
table.
This method disables the backend and leave it disabled after recovery
process. The user has to call the enableBackendFromCheckpoint
after this.
Parameters: backend - the backend to restore Parameters: login - the login to use to connect to the database for the restoreoperation Parameters: password - the password to use to connect to the database for therestore operation Parameters: dumpName - the name of the dump to restore Parameters: tables - the list of tables to restore, null means all tables throws: BackupException - if the restore operation failed |
resumeActivity | public void resumeActivity()(Code) | | Resume all transactions, writes and persistent connections.
|
rollback | public void rollback(long transactionId, boolean logRollback) throws SQLException(Code) | | Rollback a transaction given its id.
Parameters: transactionId - the transaction id Parameters: logRollback - true if the rollback should be logged in the recoverylog throws: SQLException - if an error occurs |
rollback | public void rollback(long transactionId, String savepointName) throws SQLException(Code) | | Rollback a transaction given its id to a savepoint given its name.
Parameters: transactionId - the transaction id Parameters: savepointName - the name of the savepoint throws: SQLException - if an error occurs |
scheduleStoredProcedure | public void scheduleStoredProcedure(StoredProcedure proc) throws SQLException(Code) | | This method does some sanity check on the given stored procedure and then
tries to schedule it. Note that it is more likely that on a stored
procedure the scheduler will lock in write the entire database as it does
not know which tables are accessed by the procedure.
Parameters: proc - the stored procedure to schedule throws: SQLException - if an error occurs |
setBackupManager | public void setBackupManager(BackupManager currentBackupManager)(Code) | | Sets the backup manager for this recovery log
Parameters: currentBackupManager - an instance of BackupManager |
setCacheParsingranularity | public void setCacheParsingranularity(int cacheParsingranularity)(Code) | | Sets the cacheParsingranularity value.
Parameters: cacheParsingranularity - The cacheParsingranularity to set. |
setCaseSensitiveParsing | public void setCaseSensitiveParsing(boolean isCaseSensitiveParsing)(Code) | | Sets the parsing case sensitivity. If true the request are parsed in a case
sensitive way (table/column name must match exactly the case of the names
fetched from the database or enforced by a static schema).
Parameters: isCaseSensitiveParsing - true if parsing is case sensitive |
setDatabaseSchema | public synchronized void setDatabaseSchema(DatabaseSchema schema, boolean isStatic)(Code) | | Sets the DatabaseSchema to be able to parse the requests and
find dependencies.
Parameters: schema - a DatabaseSchema value Parameters: isStatic - true if the given schema is static |
setLoadBalancer | public void setLoadBalancer(AbstractLoadBalancer loadBalancer)(Code) | | Set the Request Load Balancer to use in this Request Controller.
Parameters: loadBalancer - a Request Load Balancer implementation |
setMetadataCache | public void setMetadataCache(MetadataCache metadataCache)(Code) | | Sets the metadataCache value.
Parameters: metadataCache - The metadataCache to set. |
setParsingCache | public void setParsingCache(ParsingCache parsingCache)(Code) | | Sets the ParsingCache.
Parameters: parsingCache - The parsingCache to set. |
setRecoveryLog | public void setRecoveryLog(RecoveryLog recoveryLog)(Code) | | Sets the Recovery Log Manager.
Parameters: recoveryLog - The log recovery to set |
setResultCache | public void setResultCache(AbstractResultCache cache)(Code) | | Set the Request Cache to use in this Request Controller.
Parameters: cache - a Request Cache implementation |
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 generated id of the new savepoint throws: 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 throws: SQLException - if an error occurs |
setScheduler | public void setScheduler(AbstractScheduler scheduler)(Code) | | Set the Request Scheduler to use in this Request Controller.
Parameters: scheduler - a Request Scheduler implementation |
setSchedulerParsingranularity | public void setSchedulerParsingranularity(int schedulerParsingranularity)(Code) | | Sets the schedulerParsingranularity value.
Parameters: schedulerParsingranularity - The schedulerParsingranularity to set. |
setSchemaIsDirty | public synchronized void setSchemaIsDirty(boolean schemaIsDirty)(Code) | | Sets the schemaIsDirty value if the backend schema needs to be refreshed.
Parameters: schemaIsDirty - The schemaIsDirty to set. |
setStaticSchema | public void setStaticSchema(boolean schemaIsStatic)(Code) | | Sets the schemaIsStatic value.
Parameters: schemaIsStatic - The schemaIsStatic to set. |
statementExecuteQuery | public ControllerResultSet statementExecuteQuery(SelectRequest request) throws SQLException(Code) | | Perform a read request and return the reply. Call first the scheduler, then
the cache (if defined) and finally the load balancer.
Parameters: request - the request to execute a ControllerResultSet value exception: SQLException - if an error occurs |
statementExecuteUpdate | public ExecuteUpdateResult statementExecuteUpdate(AbstractWriteRequest request) throws SQLException(Code) | | Perform a write request and return the number of rows affected Call first
the scheduler (if defined), then notify the cache (if defined) and finally
call the load balancer.
Parameters: request - the request to execute number of rows affected exception: SQLException - if an error occurs |
statementExecuteUpdateWithKeys | public GeneratedKeysResult statementExecuteUpdateWithKeys(AbstractWriteRequest request) throws SQLException(Code) | | Perform a write request and return the auto generated keys. Call first the
scheduler (if defined), then notify the cache (if defined) and finally call
the load balancer.
Parameters: request - the request to execute auto generated keys. exception: SQLException - if an error occurs |
storeBackendsInfo | public void storeBackendsInfo(String databaseName, ArrayList backends)(Code) | | Store all the backends checkpoint in the recoverylog
Parameters: databaseName - the virtual database name Parameters: backends - the Arraylist of backends |
suspendActivity | public void suspendActivity() throws SQLException(Code) | | Suspend all transactions, writes and persistent connections.
throws: SQLException - if an error occured while waiting for writes ortransactions to complete |
updateAndNotifyExecWriteRequest | public void updateAndNotifyExecWriteRequest(AbstractWriteRequest request, int updateCount) throws SQLException(Code) | | Update the recovery log, cache, update the database schema if needed and
finally notify the scheduler. Note that if an error occurs, the scheduler
is always notified.
Parameters: request - the request to execute Parameters: updateCount - the update count if query was executed withexecuteUpdate(), -1 otherwise throws: SQLException - if an error occurs |
updateRecoveryLogFlushCacheAndRefreshSchema | public void updateRecoveryLogFlushCacheAndRefreshSchema(StoredProcedure proc) throws SQLException(Code) | | Update the recovery log with successful completion of the query, flush the
cache and force schema refresh if needed.
Parameters: proc - the stored procedure to log throws: SQLException - if the transaction context could not be updated |
Methods inherited from org.continuent.sequoia.controller.jmx.AbstractStandardMBean | public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback)(Code)(Java Doc) abstract public String getAssociatedString()(Code)(Java Doc) public NotificationBroadcasterSupport getBroadcaster()(Code)(Java Doc) protected String getDescription(MBeanInfo info)(Code)(Java Doc) protected String getDescription(MBeanConstructorInfo ctor)(Code)(Java Doc) protected String getDescription(MBeanConstructorInfo ctor, MBeanParameterInfo param, int sequence)(Code)(Java Doc) protected String getDescription(MBeanAttributeInfo info)(Code)(Java Doc) protected String getDescription(MBeanOperationInfo info)(Code)(Java Doc) protected String getDescription(MBeanOperationInfo op, MBeanParameterInfo param, int sequence)(Code)(Java Doc) public MBeanNotificationInfo[] getNotificationInfo()(Code)(Java Doc) protected String getParameterName(MBeanConstructorInfo ctor, MBeanParameterInfo param, int sequence)(Code)(Java Doc) protected String getParameterName(MBeanOperationInfo op, MBeanParameterInfo param, int sequence)(Code)(Java Doc) public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException(Code)(Java Doc) public void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException(Code)(Java Doc) public void sendNotification(Notification notification)(Code)(Java Doc)
|
|
|