| java.lang.Object org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer org.continuent.sequoia.controller.loadbalancer.raidb0.RAIDb0
Method Summary | |
public void | abort(TransactionMetaData tm) | final public void | begin(TransactionMetaData tm) Begins a new transaction. | public ExecuteResult | callableStatementExecute(StoredProcedure proc, MetadataCache metadataCache) | public ControllerResultSet | callableStatementExecuteQuery(StoredProcedure proc, MetadataCache metadataCache) | public ExecuteUpdateResult | callableStatementExecuteUpdate(StoredProcedure proc) | public void | closePersistentConnection(String login, long persistentConnectionId) | public void | commit(TransactionMetaData tm) Commits a transaction. | public void | disableBackend(DatabaseBackend db, boolean forceDisable) Disables a backend that was previously enabled. | public void | enableBackend(DatabaseBackend db, boolean writeEnabled) Enables a Backend that was previously disabled. | protected ControllerResultSet | executeRequestOnBackend(SelectRequest request, DatabaseBackend backend, MetadataCache metadataCache) Execute a read request on the selected backend. | public String | getInformation() | public ControllerResultSet | getPreparedStatementGetMetaData(AbstractRequest request) | public String | getXmlImpl() | public void | openPersistentConnection(String login, long persistentConnectionId) | public ExecuteResult | readOnlyCallableStatementExecute(StoredProcedure proc, MetadataCache metadataCache) | public ControllerResultSet | readOnlyCallableStatementExecuteQuery(StoredProcedure proc, MetadataCache metadataCache) | public void | releaseSavepoint(TransactionMetaData tm, String savepointName) | public void | rollback(TransactionMetaData tm) Rollbacks a transaction. | public void | rollbackToSavepoint(TransactionMetaData tm, String savepointName) | public void | setSavepoint(TransactionMetaData tm, String savepointName) Set a savepoint to a transaction. | public void | setWeight(String name, int w) | public ExecuteResult | statementExecute(AbstractRequest request, MetadataCache metadataCache) | public ControllerResultSet | statementExecuteQuery(SelectRequest request, MetadataCache metadataCache) Performs a read request on the backend that has the needed tables to
executes the request. | public ExecuteUpdateResult | statementExecuteUpdate(AbstractWriteRequest request) Performs a write request on the backend that has the needed tables to
executes the request. | public GeneratedKeysResult | statementExecuteUpdateWithKeys(AbstractWriteRequest request, MetadataCache metadataCache) |
RAIDb0 | public RAIDb0(VirtualDatabase vdb, CreateTablePolicy createTablePolicy) throws Exception(Code) | | Creates a new RAIDb-0 request load balancer.
Parameters: vdb - the virtual database this load balancer belongs to. Parameters: createTablePolicy - the policy defining how 'create table' statementsshould be handled throws: Exception - if an error occurs |
disableBackend | public void disableBackend(DatabaseBackend db, boolean forceDisable) throws SQLException(Code) | | Disables a backend that was previously enabled.
Ask the corresponding connection manager to finalize the connections if
needed.
No sanity checks are performed by this function.
Parameters: db - the database backend to disable Parameters: forceDisable - true if disabling must be forced on the backend throws: SQLException - if an error occurs |
enableBackend | public void enableBackend(DatabaseBackend db, boolean writeEnabled) throws SQLException(Code) | | Enables a Backend that was previously disabled.
Ask the corresponding connection manager to initialize the connections if
needed.
No sanity checks are performed by this function.
Parameters: db - the database backend to enable Parameters: writeEnabled - True if the backend must be enabled for writes throws: SQLException - if an error occurs |
executeRequestOnBackend | protected ControllerResultSet executeRequestOnBackend(SelectRequest request, DatabaseBackend backend, MetadataCache metadataCache) throws SQLException(Code) | | Execute a read request on the selected backend.
Parameters: request - the request to execute Parameters: backend - the backend that will execute the request Parameters: metadataCache - the metadataCache if any or null the ControllerResultSet if (!success)recoveryLog.logRequestCompletion(request.getLogId(), false,request.getExecTimeInMs()); throws: SQLException - if an error occurs |
getInformation | public String getInformation()(Code) | | Get information about the Request load balancer
String containing information |
releaseSavepoint | public void releaseSavepoint(TransactionMetaData tm, String savepointName) throws SQLException(Code) | | Release a savepoint from a transaction
Parameters: tm - The transaction marker metadata Parameters: savepointName - The name of the savepoint ro release throws: SQLException - if an error occurs |
rollbackToSavepoint | public void rollbackToSavepoint(TransactionMetaData tm, String savepointName) throws SQLException(Code) | | Rollback a transaction to a savepoint
Parameters: tm - The transaction marker metadata Parameters: savepointName - The name of the savepoint throws: SQLException - if an error occurs |
setSavepoint | public void setSavepoint(TransactionMetaData tm, String savepointName) throws SQLException(Code) | | Set a savepoint to a transaction.
Parameters: tm - The transaction marker metadata Parameters: savepointName - The name of the new savepoint throws: SQLException - if an error occurs |
statementExecuteUpdate | public ExecuteUpdateResult statementExecuteUpdate(AbstractWriteRequest request) throws SQLException(Code) | | Performs a write request on the backend that has the needed tables to
executes the request.
Parameters: request - an AbstractWriteRequest number of rows affected by the request exception: SQLException - if an error occurs |
Methods inherited from org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer | abstract public void abort(TransactionMetaData tm) throws SQLException(Code)(Java Doc) protected int acquireLockAndCheckNbOfThreads(Object request, String requestDescription) throws SQLException, NoMoreBackendException(Code)(Java Doc) abstract public void begin(TransactionMetaData tm) throws SQLException(Code)(Java Doc) abstract public ExecuteResult callableStatementExecute(StoredProcedure proc, MetadataCache metadataCache) throws AllBackendsFailedException, SQLException(Code)(Java Doc) abstract public ControllerResultSet callableStatementExecuteQuery(StoredProcedure proc, MetadataCache metadataCache) throws AllBackendsFailedException, SQLException(Code)(Java Doc) abstract public ExecuteUpdateResult callableStatementExecuteUpdate(StoredProcedure proc) throws AllBackendsFailedException, SQLException(Code)(Java Doc) abstract public void closePersistentConnection(String login, long persistentConnectionId) throws SQLException(Code)(Java Doc) abstract public void commit(TransactionMetaData tm) throws AllBackendsFailedException, SQLException(Code)(Java Doc) abstract public void disableBackend(DatabaseBackend db, boolean forceDisable) throws SQLException(Code)(Java Doc) abstract public void enableBackend(DatabaseBackend db, boolean writeEnabled) throws SQLException(Code)(Java Doc) final public static ExecuteResult executeCallableStatementExecuteOnBackend(StoredProcedure proc, DatabaseBackend backend, BackendWorkerThread workerThread, PooledConnection pc, MetadataCache metadataCache) throws SQLException, BadConnectionException(Code)(Java Doc) final public static ControllerResultSet executeCallableStatementExecuteQueryOnBackend(StoredProcedure proc, DatabaseBackend backend, BackendWorkerThread workerThread, Connection c, MetadataCache metadataCache) throws SQLException, BadConnectionException(Code)(Java Doc) final public static ExecuteUpdateResult executeCallableStatementExecuteUpdateOnBackend(StoredProcedure proc, DatabaseBackend backend, BackendWorkerThread workerThread, PooledConnection pc) throws SQLException, BadConnectionException(Code)(Java Doc) final public static ExecuteResult executeStatementExecuteOnBackend(AbstractRequest request, DatabaseBackend backend, BackendWorkerThread workerThread, PooledConnection pc, MetadataCache metadataCache) throws SQLException, BadConnectionException(Code)(Java Doc) final public static ControllerResultSet executeStatementExecuteQueryOnBackend(SelectRequest request, DatabaseBackend backend, BackendWorkerThread workerThread, Connection c, MetadataCache metadataCache) throws SQLException, BadConnectionException, UnreachableBackendException(Code)(Java Doc) final public static ExecuteUpdateResult executeStatementExecuteUpdateOnBackend(AbstractWriteRequest request, DatabaseBackend backend, BackendWorkerThread workerThread, PooledConnection pc) throws SQLException, BadConnectionException(Code)(Java Doc) final public static GeneratedKeysResult executeStatementExecuteUpdateWithKeysOnBackend(AbstractWriteRequest request, DatabaseBackend backend, BackendWorkerThread workerThread, PooledConnection pc, MetadataCache metadataCache) throws SQLException, BadConnectionException(Code)(Java Doc) final public static Connection getConnectionAndBeginTransaction(DatabaseBackend backend, AbstractConnectionManager cm, AbstractRequest request) throws SQLException, UnreachableBackendException(Code)(Java Doc) final public static int getDefaultTransactionIsolationLevel()(Code)(Java Doc) abstract public String getInformation()(Code)(Java Doc) protected int getNbToWait(int nbOfThreads)(Code)(Java Doc) public int getNumberOfEnabledBackends()(Code)(Java Doc) public int getParsingGranularity()(Code)(Java Doc) abstract public ControllerResultSet getPreparedStatementGetMetaData(AbstractRequest request) throws SQLException(Code)(Java Doc) public int getRAIDbLevel()(Code)(Java Doc) final public RecoveryLog getRecoveryLog()(Code)(Java Doc) public String getXml()(Code)(Java Doc) abstract public String getXmlImpl()(Code)(Java Doc) public void handleMacros(AbstractRequest request)(Code)(Java Doc) abstract public void openPersistentConnection(String login, long persistentConnectionId) throws SQLException(Code)(Java Doc) final public static ControllerResultSet preparedStatementGetMetaDataOnBackend(String sqlTemplate, DatabaseBackend backend, Connection c) throws SQLException, BadConnectionException(Code)(Java Doc) abstract public ExecuteResult readOnlyCallableStatementExecute(StoredProcedure proc, MetadataCache metadataCache) throws SQLException(Code)(Java Doc) abstract public ControllerResultSet readOnlyCallableStatementExecuteQuery(StoredProcedure proc, MetadataCache metadataCache) throws SQLException(Code)(Java Doc) protected void releaseLockAndUnlockNextQuery(Object currentQuery)(Code)(Java Doc) abstract public void releaseSavepoint(TransactionMetaData tm, String name) throws AllBackendsFailedException, SQLException(Code)(Java Doc) public void removeObjectFromAndNotifyTotalOrderQueue(Object request)(Code)(Java Doc) abstract public void rollback(TransactionMetaData tm) throws AllBackendsFailedException, SQLException(Code)(Java Doc) abstract public void rollbackToSavepoint(TransactionMetaData tm, String savepointName) throws AllBackendsFailedException, SQLException(Code)(Java Doc) final public void setDefaultTransactionIsolationLevel(int defaultTransactionIsolationLevel)(Code)(Java Doc) public void setMacroHandler(MacrosHandler handler)(Code)(Java Doc) final public void setRecoveryLog(RecoveryLog recoveryLog)(Code)(Java Doc) abstract public void setSavepoint(TransactionMetaData tm, String name) throws AllBackendsFailedException, SQLException(Code)(Java Doc) public void setWeight(String name, int w) throws SQLException(Code)(Java Doc) abstract public ExecuteResult statementExecute(AbstractRequest request, MetadataCache metadataCache) throws AllBackendsFailedException, SQLException(Code)(Java Doc) abstract public ControllerResultSet statementExecuteQuery(SelectRequest request, MetadataCache metadataCache) throws SQLException, AllBackendsFailedException(Code)(Java Doc) abstract public ExecuteUpdateResult statementExecuteUpdate(AbstractWriteRequest request) throws AllBackendsFailedException, NoMoreBackendException, SQLException(Code)(Java Doc) abstract public GeneratedKeysResult statementExecuteUpdateWithKeys(AbstractWriteRequest request, MetadataCache metadataCache) throws AllBackendsFailedException, NoMoreBackendException, SQLException(Code)(Java Doc) public void waitForSuspendWritesToComplete(AbstractRequest request)(Code)(Java Doc) public static void waitForTaskCompletion(long timeout, String requestDescription, AbstractTask task) throws SQLException(Code)(Java Doc) public boolean waitForTotalOrder(Object request, boolean errorIfNotFound)(Code)(Java Doc)
|
|
|