org.objectweb.cjdbc.controller.requestmanager.distributed
Class RAIDb2DistributedRequestManager

java.lang.Object
  extended byjavax.management.StandardMBean
      extended byorg.objectweb.cjdbc.controller.jmx.AbstractStandardMBean
          extended byorg.objectweb.cjdbc.controller.requestmanager.RequestManager
              extended byorg.objectweb.cjdbc.controller.requestmanager.distributed.DistributedRequestManager
                  extended byorg.objectweb.cjdbc.controller.requestmanager.distributed.RAIDb2DistributedRequestManager
All Implemented Interfaces:
javax.management.DynamicMBean, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, RequestManagerMBean, XmlComponent

public class RAIDb2DistributedRequestManager
extends DistributedRequestManager

This class defines a RAIDb2DistributedRequestManager

Version:
1.0
Author:
Emmanuel Cecchet , Jean-Bernard van Zuylen

Nested Class Summary
 
Nested classes inherited from class javax.management.StandardMBean
 
Field Summary
 
Fields inherited from class org.objectweb.cjdbc.controller.requestmanager.distributed.DistributedRequestManager
CONTROLLER_ID_BIT_MASK, CONTROLLER_ID_BITS, CONTROLLER_ID_SHIFT_BITS, dvdb, NO_RESULT, TRANSACTION_ID_BIT_MASK
 
Fields inherited from class org.objectweb.cjdbc.controller.requestmanager.RequestManager
backupManager, beginTimeout, commitTimeout, dbs, loadBalancer, logger, parsingCache, recoveryLog, requiredParsingGranularity, resultCache, rollbackTimeout, scheduler, schedulerParsingranularity, tidLoginTable, tidSavepoints, vdb
 
Fields inherited from class org.objectweb.cjdbc.controller.jmx.AbstractStandardMBean
 
Fields inherited from class javax.management.StandardMBean
 
Fields inherited from interface org.objectweb.cjdbc.common.xml.XmlComponent
DOCTYPE_CONTROLLER, DOCTYPE_DB, XML_VERSION
 
Constructor Summary
RAIDb2DistributedRequestManager(DistributedVirtualDatabase vdb, AbstractScheduler scheduler, AbstractResultCache cache, AbstractLoadBalancer loadBalancer, RecoveryLog recoveryLog, long beginTimeout, long commitTimeout, long rollbackTimeout)
          Creates a new RAIDb2DistributedRequestManager instance
 
Method Summary
 void distributedCommit(java.lang.String login, long transactionId)
          Distributed implementation of a commit
 void distributedReleaseSavepoint(long transactionId, java.lang.String name)
          Distributed implementation of releasing a savepoint from a transaction
 void distributedRollback(long transactionId, java.lang.String savepointName)
          Distributed implementation of a rollback to a savepoint
 void distributedRollback(java.lang.String login, long transactionId)
          Distributed implementation of a rollback
 void distributedSetSavepoint(long transactionId, java.lang.String name)
          Distributed implementation of setting a savepoint to a transaction
 ControllerResultSet execDistributedReadStoredProcedure(StoredProcedure proc)
          Distributed implementation of a read stored procedure execution.
 int execDistributedWriteRequest(AbstractWriteRequest request)
          Distributed implementation of a write request execution.
 ControllerResultSet execDistributedWriteRequestWithKeys(AbstractWriteRequest request)
          Distributed implementation of a write request execution that returns auto-generated keys.
 int execDistributedWriteStoredProcedure(StoredProcedure proc)
          Distributed implementation of a write stored procedure execution.
 ControllerResultSet execRemoteReadRequest(SelectRequest request)
          Execute a read request on some remote controller - one in the group.
 
Methods inherited from class org.objectweb.cjdbc.controller.requestmanager.distributed.DistributedRequestManager
addFailedOnAllBackends, begin, commit, completeFailedOnAllBackends, disableBackend, disableBackendForCheckpoint, enableBackend, execDistributedWriteStoredProcedureLocally, execLocalReadRequest, execReadRequest, execReadStoredProcedure, execReadStoredProcedureLocally, execWriteRequest, execWriteRequestWithKeys, execWriteStoredProcedure, getControllerId, getLogger, getVirtualDatabase, lazyTransactionStart, releaseSavepoint, removeFailedCommitFromRecoveryLog, removeFailedRequestFromRecoveryLog, removeFailedRollbackFromRecoveryLog, removeFailedStoredProcedureFromRecoveryLog, rollback, rollback, scheduleExecWriteRequest, setControllerId, setSavepoint, setSavepoint, setScheduler
 
Methods inherited from class org.objectweb.cjdbc.controller.requestmanager.RequestManager
abort, addSavepoint, backupBackend, completeTransaction, disableBackendsForCheckpoint, enableBackendFromCheckpoint, flushCacheAndLogStoredProcedure, getAssociatedString, getBackendStateListener, getBackupManager, getBeginTimeout, getCacheParsingranularity, getCommitTimeout, getDatabaseSchema, getLoadBalancer, getLoadBalancerParsingranularity, getMetadataCache, getRecoveryLog, getRequiredParsingGranularity, getResultCache, getRollbackTimeout, getScheduler, getSchedulerParsingranularity, getTransactionMarker, getXml, hasSavepoint, isCaseSensitiveParsing, isSchemaIsStatic, loadBalanceExecWriteRequest, loadBalanceExecWriteRequestWithKeys, loadBalanceReadStoredProcedure, loadBalanceWriteStoredProcedure, logLazyTransactionBegin, mergeDatabaseSchema, removeCheckpoint, removeSavepoint, removeSavepoints, restoreBackendFromBackupCheckpoint, scheduleStoredProcedure, setBackupManager, setBeginTimeout, setCacheParsingranularity, setCaseSensitiveParsing, setCommitTimeout, setDatabaseSchema, setLoadBalancer, setLoadBalancerParsingranularity, setMetadataCache, setParsingCache, setRecoveryLog, setRequiredParsingGranularity, setResultCache, setRollbackTimeout, setSchedulerParsingranularity, setSchemaIsDirty, setSchemaIsStatic, storeBackendsInfo, updateAndNotifyExecWriteRequest
 
Methods inherited from class org.objectweb.cjdbc.controller.jmx.AbstractStandardMBean
addNotificationListener, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getNotificationInfo, getParameterName, getParameterName, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class javax.management.StandardMBean
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, invoke, setAttribute, setAttributes, setImplementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RAIDb2DistributedRequestManager

public RAIDb2DistributedRequestManager(DistributedVirtualDatabase vdb,
                                       AbstractScheduler scheduler,
                                       AbstractResultCache cache,
                                       AbstractLoadBalancer loadBalancer,
                                       RecoveryLog recoveryLog,
                                       long beginTimeout,
                                       long commitTimeout,
                                       long rollbackTimeout)
                                throws java.sql.SQLException,
                                       javax.management.NotCompliantMBeanException
Creates a new RAIDb2DistributedRequestManager instance

Parameters:
vdb - the virtual database this request manager belongs to
scheduler - the Request Scheduler to use
cache - a Query Cache implementation
loadBalancer - the Request Load Balancer to use
recoveryLog - the Log Recovery to use
beginTimeout - timeout in seconds for begin
commitTimeout - timeout in seconds for commit
rollbackTimeout - timeout in seconds for rollback
Throws:
java.sql.SQLException - if an error occurs
javax.management.NotCompliantMBeanException - if the MBean is not JMX compliant
Method Detail

execRemoteReadRequest

public ControllerResultSet execRemoteReadRequest(SelectRequest request)
                                          throws java.sql.SQLException
Description copied from class: DistributedRequestManager
Execute a read request on some remote controller - one in the group. Used when the local controller has no backend available to execute the request.

Specified by:
execRemoteReadRequest in class DistributedRequestManager
Parameters:
request - the request to execute
Returns:
the query ResultSet
Throws:
java.sql.SQLException - in case of bad request
See Also:
DistributedRequestManager.execRemoteReadRequest(org.objectweb.cjdbc.common.sql.SelectRequest)

execDistributedWriteRequest

public int execDistributedWriteRequest(AbstractWriteRequest request)
                                throws java.sql.SQLException
Description copied from class: DistributedRequestManager
Distributed implementation of a write request execution.

Specified by:
execDistributedWriteRequest in class DistributedRequestManager
Parameters:
request - request to execute
Returns:
number of modified rows
Throws:
java.sql.SQLException - if an error occurs
See Also:
DistributedRequestManager.execDistributedWriteRequest(org.objectweb.cjdbc.common.sql.AbstractWriteRequest)

execDistributedWriteRequestWithKeys

public ControllerResultSet execDistributedWriteRequestWithKeys(AbstractWriteRequest request)
                                                        throws java.sql.SQLException
Description copied from class: DistributedRequestManager
Distributed implementation of a write request execution that returns auto-generated keys.

Specified by:
execDistributedWriteRequestWithKeys in class DistributedRequestManager
Parameters:
request - request to execute
Returns:
ResultSet containing the auto-generated keys.
Throws:
java.sql.SQLException - if an error occurs
See Also:
DistributedRequestManager.execDistributedWriteRequestWithKeys(org.objectweb.cjdbc.common.sql.AbstractWriteRequest)

execDistributedReadStoredProcedure

public ControllerResultSet execDistributedReadStoredProcedure(StoredProcedure proc)
                                                       throws java.sql.SQLException
Description copied from class: DistributedRequestManager
Distributed implementation of a read stored procedure execution.

Specified by:
execDistributedReadStoredProcedure in class DistributedRequestManager
Parameters:
proc - stored procedure to execute
Returns:
ResultSet corresponding to this stored procedure execution
Throws:
java.sql.SQLException - if an error occurs
See Also:
DistributedRequestManager.execDistributedReadStoredProcedure(StoredProcedure)

execDistributedWriteStoredProcedure

public int execDistributedWriteStoredProcedure(StoredProcedure proc)
                                        throws java.sql.SQLException
Description copied from class: DistributedRequestManager
Distributed implementation of a write stored procedure execution.

Specified by:
execDistributedWriteStoredProcedure in class DistributedRequestManager
Parameters:
proc - stored procedure to execute
Returns:
number of modified rows
Throws:
java.sql.SQLException - if an error occurs
See Also:
DistributedRequestManager.execDistributedWriteStoredProcedure(org.objectweb.cjdbc.common.sql.StoredProcedure)

distributedCommit

public void distributedCommit(java.lang.String login,
                              long transactionId)
                       throws java.sql.SQLException
Description copied from class: DistributedRequestManager
Distributed implementation of a commit

Specified by:
distributedCommit in class DistributedRequestManager
Parameters:
login - login that commit the transaction
transactionId - id of the commiting transaction
Throws:
java.sql.SQLException - if an error occurs
See Also:
DistributedRequestManager.distributedCommit(String, long)

distributedRollback

public void distributedRollback(java.lang.String login,
                                long transactionId)
                         throws java.sql.SQLException
Description copied from class: DistributedRequestManager
Distributed implementation of a rollback

Specified by:
distributedRollback in class DistributedRequestManager
Parameters:
login - login that rollback the transaction
transactionId - id of the rollbacking transaction
Throws:
java.sql.SQLException - if an error occurs
See Also:
DistributedRequestManager.distributedRollback(String, long)

distributedRollback

public void distributedRollback(long transactionId,
                                java.lang.String savepointName)
                         throws java.sql.SQLException
Description copied from class: DistributedRequestManager
Distributed implementation of a rollback to a savepoint

Specified by:
distributedRollback in class DistributedRequestManager
Parameters:
transactionId - id of the transaction
savepointName - name of the savepoint
Throws:
java.sql.SQLException - if an error occurs
See Also:
DistributedRequestManager.distributedRollback(long, String)

distributedSetSavepoint

public void distributedSetSavepoint(long transactionId,
                                    java.lang.String name)
                             throws java.sql.SQLException
Description copied from class: DistributedRequestManager
Distributed implementation of setting a savepoint to a transaction

Specified by:
distributedSetSavepoint in class DistributedRequestManager
Parameters:
transactionId - id of the transaction
name - name of the savepoint to set
Throws:
java.sql.SQLException - if an error occurs
See Also:
DistributedRequestManager.distributedSetSavepoint(long, String)

distributedReleaseSavepoint

public void distributedReleaseSavepoint(long transactionId,
                                        java.lang.String name)
                                 throws java.sql.SQLException
Description copied from class: DistributedRequestManager
Distributed implementation of releasing a savepoint from a transaction

Specified by:
distributedReleaseSavepoint in class DistributedRequestManager
Parameters:
transactionId - id of the transaction
name - name of the savepoint to release
Throws:
java.sql.SQLException - if an error occurs
See Also:
DistributedRequestManager.distributedReleaseSavepoint(long, String)


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.