org.objectweb.cjdbc.controller.requestmanager
Class RequestManager

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

public class RequestManager
extends AbstractStandardMBean
implements XmlComponent, RequestManagerMBean

This class defines the Request Manager.

The RM is composed of a Request Scheduler, an optional Query Cache, and a Load Balancer and an optional Recovery Log.

Version:
1.0
Author:
Emmanuel Cecchet , Julie Marguerite , Nicolas Modrzyk , Vadim Kassin

Nested Class Summary
 
Nested classes inherited from class javax.management.StandardMBean
 
Field Summary
private  BackendStateListener backendStateListener
           
protected  BackupManager backupManager
          The backup manager responsible for backup and restore of backends
protected  long beginTimeout
          begin timeout in ms
private  int cacheParsingranularity
           
protected  long commitTimeout
          commit timeout in ms
protected  DatabaseSchema dbs
           
private  boolean isCaseSensitiveParsing
           
protected  AbstractLoadBalancer loadBalancer
          The request load balancer to use to send requests to the databases
private  int loadBalancerParsingranularity
           
protected static Trace logger
           
private  MetadataCache metadataCache
           
protected  ParsingCache parsingCache
           
protected  AbstractRecoveryLog recoveryLog
          An optional recovery log
protected  int requiredGranularity
           
protected  AbstractResultCache resultCache
          An optional request cache to cache responses to SQL requests
protected  long rollbackTimeout
          rollback timeout in ms
protected  AbstractScheduler scheduler
          The request scheduler to order and schedule requests
protected  int schedulerParsingranularity
           
private  boolean schemaIsStatic
           
protected  java.util.Hashtable tidLoginTable
          Transaction id/Login mapping
protected  VirtualDatabase vdb
          The virtual database owning this Request Manager
 
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_DB, XML_VERSION
 
Constructor Summary
RequestManager(VirtualDatabase vdb, AbstractScheduler scheduler, AbstractResultCache cache, AbstractLoadBalancer loadBalancer, AbstractRecoveryLog recoveryLog, long beginTimeout, long commitTimeout, long rollbackTimeout)
          Creates a new RequestManager instance.
 
Method Summary
 void abort(long transactionId)
          Abort a transaction that has been started but in which no query was executed.
private  void assignAndCheckSchedulerLoadBalancerValidity(AbstractScheduler scheduler, AbstractLoadBalancer loadBalancer)
          Check that Scheduler and Load Balancer are not null and have compatible RAIDb levels.
 void backupBackendWithCheckpoint(DatabaseBackend db, java.lang.String checkpointName, java.util.ArrayList tables, boolean enableAfter, boolean wait4Result, BackupListener listener)
          Creates a new backup with the corresponding checkpoint Note that this will disable the backend for the time of the backup
 long begin(java.lang.String login)
          Begin a new transaction and return the corresponding transaction identifier.
 void callBackupManager(boolean backup, DatabaseBackend db, java.lang.String checkpoint, java.util.ArrayList tables, boolean enableAfter, BackupListener listener)
          Call the backup manager on the given backend.
 void commit(long transactionId)
          Commit a transaction given its id.
 void completeTransaction(java.lang.Long tid)
          Complete the transaction by removing it from the tidLoginTable.
 void disableBackend(DatabaseBackend db)
          Disable a backend that is currently enabled on this virtual database.
 void disableBackendForCheckpoint(DatabaseBackend db, java.lang.String checkpointName)
          The backend must belong to this virtual database and be in the enabled state.
 void disableBackendsForCheckpoint(java.util.ArrayList backendsArrayList, java.lang.String checkpointName)
          Disable a list of backends.
 void enableBackend(DatabaseBackend db)
          Enable a backend that has been previously added to this virtual database and that is in the disabled state.
 void enableBackendFromCheckpoint(DatabaseBackend db, java.lang.String checkpointName, boolean threaded)
          The backend must have been previously added to this virtual database and be in the disabled state.
 ControllerResultSet execReadRequest(SelectRequest request)
          Perform a read request and return the reply.
 ControllerResultSet execReadStoredProcedure(StoredProcedure proc)
          Call a stored procedure that returns a ResultSet.
 int execWriteRequest(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.
 ControllerResultSet execWriteRequestWithKeys(AbstractWriteRequest request)
          Perform a write request and return the auto generated keys.
 int execWriteStoredProcedure(StoredProcedure proc)
          Call a stored procedure that performs an update.
 java.lang.String getAssociatedString()
          Allow to retrieve internationalization description on mbeans as well
 BackendStateListener getBackendStateListener()
          Returns the backendStateListener value.
 BackupManager getBackupManager()
          Returns the backupManager value.
 long getBeginTimeout()
          Returns the beginTimeout value.
 int getCacheParsingranularity()
          Returns the cacheParsingranularity value.
 long getCommitTimeout()
          Returns the commitTimeout value.
 DatabaseSchema getDatabaseSchema()
          Get the DatabaseSchema used by this Request Manager.
 AbstractLoadBalancer getLoadBalancer()
          Get the Request Load Balancer used in this Request Controller.
 int getLoadBalancerParsingranularity()
          Returns the loadBalancerParsingranularity value.
 MetadataCache getMetadataCache()
          Returns the metadataCache value.
 AbstractRecoveryLog getRecoveryLog()
          Returns the Recovery Log Manager.
 int getRequiredGranularity()
          Returns the requiredGranularity value.
 int getRequiredParsingGranularity()
           
 AbstractResultCache getResultCache()
          Get the result cache (if any) used in this Request Manager.
 long getRollbackTimeout()
          Returns the rollbackTimeout value.
 AbstractScheduler getScheduler()
          Get the Request Scheduler (if any) used in this Request Controller.
 int getSchedulerParsingranularity()
          Returns the schedulerParsingranularity value.
 TransactionMarkerMetaData getTransactionMarker(java.lang.Long tid)
          Get the TransactionMarkerMetaData for the given transaction id.
 VirtualDatabase getVirtualDatabase()
          Returns the vdb value.
 java.lang.String getXml()
          Get xml information about this Request Manager
private  void initRequestManagerVariables(VirtualDatabase vdb, long beginTimeout, long commitTimeout, long rollbackTimeout)
          Method initRequestManagerVariables.
 boolean isCaseSensitiveParsing()
          Returns the isCaseSensitiveParsing value.
 boolean isSchemaIsStatic()
          Returns the schemaIsStatic value.
 int loadBalanceExecWriteRequest(AbstractWriteRequest request)
          Send the given query to the load balancer.
 ControllerResultSet loadBalanceExecWriteRequestWithKeys(AbstractWriteRequest request)
          Send the given query to the load balancer.
 void mergeDatabaseSchema(DatabaseSchema backendSchema)
          Merge the given schema with the existing database schema.
 void removeCheckpoint(java.lang.String checkpointName)
          Remove a checkpoint and corresponding entries from the log table
 void restoreBackendFromBackupCheckpoint(DatabaseBackend db, java.lang.String checkpointName, boolean wait4Result, BackupListener listener)
          Recopy all the data of a previous dump recorded by octopus into the named backend.
 void rollback(long transactionId)
          Rollback a transaction given its id.
 void scheduleExecWriteRequest(AbstractWriteRequest request)
          Schedule a request for execution.
private  void setBackendsLastKnownCheckpointFromRecoveryLog()
          Retrieve the last known checkpoint from the recovery log and set it for each backend.
 void setBackupManager(BackupManager currentBackupManager)
          Sets the backup manager for this recovery log
 void setBeginTimeout(long beginTimeout)
          Sets the beginTimeout value.
 void setCacheParsingranularity(int cacheParsingranularity)
          Sets the cacheParsingranularity value.
 void setCaseSensitiveParsing(boolean isCaseSensitiveParsing)
          Sets the parsing case sensitivity.
 void setCommitTimeout(long commitTimeout)
          Sets the commitTimeout value.
 void setDatabaseSchema(DatabaseSchema schema, boolean isStatic)
          Sets the DatabaseSchema to be able to parse the requests and find dependencies.
 void setLoadBalancer(AbstractLoadBalancer loadBalancer)
          Set the Request Load Balancer to use in this Request Controller.
 void setLoadBalancerParsingranularity(int loadBalancerParsingranularity)
          Sets the loadBalancerParsingranularity value.
 void setMetadataCache(MetadataCache metadataCache)
          Sets the metadataCache value.
 void setParsingCache(ParsingCache parsingCache)
          Sets the ParsingCache.
 void setRecoveryLog(AbstractRecoveryLog recoveryLog)
          Sets the Recovery Log Manager.
 void setRequiredGranularity(int requiredGranularity)
          Sets the requiredGranularity value.
 void setResultCache(AbstractResultCache cache)
          Set the Request Cache to use in this Request Controller.
 void setRollbackTimeout(long rollbackTimeout)
          Sets the rollbackTimeout value.
 void setScheduler(AbstractScheduler scheduler)
          Set the Request Scheduler to use in this Request Controller.
 void setSchedulerParsingranularity(int schedulerParsingranularity)
          Sets the schedulerParsingranularity value.
 void setSchemaIsStatic(boolean schemaIsStatic)
          Sets the schemaIsStatic value.
 void storeBackendsInfo(java.lang.String databaseName, java.util.ArrayList backends)
          Store all the backends checkpoint in the recoverylog
 void updateAndNotifyExecWriteRequest(AbstractWriteRequest request, boolean notifyRecoveryLogAndScheduler)
          Update the cache, notify the recovery log and finally the scheduler.
 
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
 

Field Detail

beginTimeout

protected long beginTimeout
begin timeout in ms


commitTimeout

protected long commitTimeout
commit timeout in ms


rollbackTimeout

protected long rollbackTimeout
rollback timeout in ms


vdb

protected VirtualDatabase vdb
The virtual database owning this Request Manager


scheduler

protected AbstractScheduler scheduler
The request scheduler to order and schedule requests


resultCache

protected AbstractResultCache resultCache
An optional request cache to cache responses to SQL requests


loadBalancer

protected AbstractLoadBalancer loadBalancer
The request load balancer to use to send requests to the databases


recoveryLog

protected AbstractRecoveryLog recoveryLog
An optional recovery log


backupManager

protected BackupManager backupManager
The backup manager responsible for backup and restore of backends


dbs

protected DatabaseSchema dbs

schemaIsStatic

private boolean schemaIsStatic

isCaseSensitiveParsing

private boolean isCaseSensitiveParsing

parsingCache

protected ParsingCache parsingCache

metadataCache

private MetadataCache metadataCache

schedulerParsingranularity

protected int schedulerParsingranularity

cacheParsingranularity

private int cacheParsingranularity

loadBalancerParsingranularity

private int loadBalancerParsingranularity

requiredGranularity

protected int requiredGranularity

tidLoginTable

protected java.util.Hashtable tidLoginTable
Transaction id/Login mapping


logger

protected static Trace logger

backendStateListener

private BackendStateListener backendStateListener
Constructor Detail

RequestManager

public RequestManager(VirtualDatabase vdb,
                      AbstractScheduler scheduler,
                      AbstractResultCache cache,
                      AbstractLoadBalancer loadBalancer,
                      AbstractRecoveryLog recoveryLog,
                      long beginTimeout,
                      long commitTimeout,
                      long rollbackTimeout)
               throws java.sql.SQLException,
                      javax.management.NotCompliantMBeanException
Creates a new RequestManager 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

setBackendsLastKnownCheckpointFromRecoveryLog

private void setBackendsLastKnownCheckpointFromRecoveryLog()
Retrieve the last known checkpoint from the recovery log and set it for each backend.


assignAndCheckSchedulerLoadBalancerValidity

private void assignAndCheckSchedulerLoadBalancerValidity(AbstractScheduler scheduler,
                                                         AbstractLoadBalancer loadBalancer)
                                                  throws java.sql.SQLException
Check that Scheduler and Load Balancer are not null and have compatible RAIDb levels.

Parameters:
scheduler -
loadBalancer -
Throws:
java.sql.SQLException - if an error occurs

initRequestManagerVariables

private void initRequestManagerVariables(VirtualDatabase vdb,
                                         long beginTimeout,
                                         long commitTimeout,
                                         long rollbackTimeout)
Method initRequestManagerVariables.

Parameters:
vdb -
beginTimeout -
commitTimeout -
rollbackTimeout -

execReadRequest

public ControllerResultSet execReadRequest(SelectRequest request)
                                    throws java.sql.SQLException
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
Returns:
a ControllerResultSet value
Throws:
java.sql.SQLException - if an error occurs

execWriteRequest

public int execWriteRequest(AbstractWriteRequest request)
                     throws java.sql.SQLException
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
Returns:
number of rows affected
Throws:
java.sql.SQLException - if an error occurs

execWriteRequestWithKeys

public ControllerResultSet execWriteRequestWithKeys(AbstractWriteRequest request)
                                             throws java.sql.SQLException
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
Returns:
auto generated keys.
Throws:
java.sql.SQLException - if an error occurs

scheduleExecWriteRequest

public void scheduleExecWriteRequest(AbstractWriteRequest request)
                              throws java.sql.SQLException
Schedule a request for execution.

Parameters:
request - the request to execute
Throws:
java.sql.SQLException - if an error occurs

loadBalanceExecWriteRequestWithKeys

public ControllerResultSet loadBalanceExecWriteRequestWithKeys(AbstractWriteRequest request)
                                                        throws AllBackendsFailedException,
                                                               java.sql.SQLException
Send the given query to the load balancer. If the request fails, the scheduler is properly notified.

Parameters:
request - the request to execute
Returns:
auto-generated keys
Throws:
AllBackendsFailedException - if all backends failed to execute the query
java.sql.SQLException - if an error occurs

loadBalanceExecWriteRequest

public int loadBalanceExecWriteRequest(AbstractWriteRequest request)
                                throws AllBackendsFailedException,
                                       java.sql.SQLException
Send the given query to the load balancer. If the request fails, the scheduler is properly notified.

Parameters:
request - the request to execute
Returns:
number of modified lines
Throws:
AllBackendsFailedException - if all backends failed to execute the query
java.sql.SQLException - if an error occurs

updateAndNotifyExecWriteRequest

public void updateAndNotifyExecWriteRequest(AbstractWriteRequest request,
                                            boolean notifyRecoveryLogAndScheduler)
                                     throws java.sql.SQLException
Update the cache, notify the recovery log and finally the scheduler. It is possible to disable scheduler notifications (unless an error occurs in which case the scheduler is always notified). This is especially useful for distributed schedulers when all backends failed at one controller but we have to wait for the confirmation that all other controllers failed. This piece of code is then generic and reusable.

Parameters:
request - the request to execute
notifyRecoveryLogAndScheduler - true if the recovery log and the scheduler must be notified
Throws:
java.sql.SQLException - if an error occurs

execReadStoredProcedure

public ControllerResultSet execReadStoredProcedure(StoredProcedure proc)
                                            throws java.sql.SQLException
Call a stored procedure that returns a ResultSet.

Parameters:
proc - the stored procedure call
Returns:
a ControllerResultSet value
Throws:
java.sql.SQLException - if an error occurs

execWriteStoredProcedure

public int execWriteStoredProcedure(StoredProcedure proc)
                             throws java.sql.SQLException
Call a stored procedure that performs an update.

Parameters:
proc - the stored procedure call
Returns:
number of rows affected
Throws:
java.sql.SQLException - if an error occurs

begin

public long begin(java.lang.String login)
           throws java.sql.SQLException
Begin a new transaction and return the corresponding transaction identifier. This method is called from the driver when setAutoCommit(false) is called.

Parameters:
login - the login used by the connection
Returns:
int a unique transaction identifier
Throws:
java.sql.SQLException - if an error occurs

abort

public void abort(long transactionId)
           throws java.sql.SQLException
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
Throws:
java.sql.SQLException - if an error occurs

getTransactionMarker

public TransactionMarkerMetaData getTransactionMarker(java.lang.Long tid)
                                               throws java.sql.SQLException
Get the TransactionMarkerMetaData for the given transaction id.

Parameters:
tid - transaction id
Returns:
the TransactionMarkerMetaData
Throws:
java.sql.SQLException - if no marker has been found for this transaction

completeTransaction

public void completeTransaction(java.lang.Long tid)
Complete the transaction by removing it from the tidLoginTable.

Parameters:
tid - transaction id

commit

public void commit(long transactionId)
            throws java.sql.SQLException
Commit a transaction given its id.

Parameters:
transactionId - the transaction id
Throws:
java.sql.SQLException - if an error occurs

rollback

public void rollback(long transactionId)
              throws java.sql.SQLException
Rollback a transaction given its id.

Parameters:
transactionId - the transaction id
Throws:
java.sql.SQLException - if an error occurs

enableBackend

public void enableBackend(DatabaseBackend db)
                   throws java.sql.SQLException
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:
java.sql.SQLException - if an error occurs

enableBackendFromCheckpoint

public void enableBackendFromCheckpoint(DatabaseBackend db,
                                        java.lang.String checkpointName,
                                        boolean threaded)
                                 throws java.sql.SQLException
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.

Parameters:
db - The database backend to enable
checkpointName - The checkpoint name to restart from
threaded - true force the recory to be executed in a fire and forget mode
Throws:
java.sql.SQLException - if an error occurs

disableBackend

public void disableBackend(DatabaseBackend db)
                    throws java.sql.SQLException
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
Throws:
java.sql.SQLException - if an error occurs

disableBackendForCheckpoint

public void disableBackendForCheckpoint(DatabaseBackend db,
                                        java.lang.String checkpointName)
                                 throws java.sql.SQLException
The backend must belong to this virtual database and be in the enabled state.

The backend is disabled once all the pending write queries are executed. A checkpoint is inserted in the recovery log.

Parameters:
db - The database backend to enable
checkpointName - The checkpoint name to restart from
Throws:
java.sql.SQLException - if an error occurs

disableBackendsForCheckpoint

public void disableBackendsForCheckpoint(java.util.ArrayList backendsArrayList,
                                         java.lang.String checkpointName)
                                  throws java.sql.SQLException
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:
backendsArrayList - backends to disable
checkpointName - to store
Throws:
java.sql.SQLException - if an error occurs

callBackupManager

public void callBackupManager(boolean backup,
                              DatabaseBackend db,
                              java.lang.String checkpoint,
                              java.util.ArrayList tables,
                              boolean enableAfter,
                              BackupListener listener)
                       throws java.lang.Exception
Call the backup manager on the given backend. Start a fire and forget thread for backup or recovery. The only way to get the results is to wait for jmx notifications

Parameters:
backup - true if this is a backup, false if this is a restore process
db - backend object
checkpoint - the name of the checkpoint associated with the process
tables - the tables to consider while performing the copy
enableAfter - should be enable the backend automatically after
listener - backup listener for callback
Throws:
java.lang.Exception - if fails

backupBackendWithCheckpoint

public void backupBackendWithCheckpoint(DatabaseBackend db,
                                        java.lang.String checkpointName,
                                        java.util.ArrayList tables,
                                        boolean enableAfter,
                                        boolean wait4Result,
                                        BackupListener listener)
                                 throws java.sql.SQLException
Creates a new backup with the corresponding checkpoint Note that this will disable the backend for the time of the backup

Parameters:
db - the backend to backup
checkpointName - the checkpoint to insert in the log
tables - to copy or null for copy all
enableAfter - if the backend should be enable after backup
wait4Result - if the method should block until the backup is over
listener - object for callback
Throws:
java.sql.SQLException - if fails

restoreBackendFromBackupCheckpoint

public void restoreBackendFromBackupCheckpoint(DatabaseBackend db,
                                               java.lang.String checkpointName,
                                               boolean wait4Result,
                                               BackupListener listener)
                                        throws OctopusException,
                                               BackupException
Recopy all the data of a previous dump recorded by octopus into the named backend. This disables the backend and leave it disable after recovery process. The user has to call the enableBackendFromCheckpoint after this.

Parameters:
db - the backend to restore
checkpointName - the name of the checkpoint that has a dump
wait4Result - should we blocked this method until the restore is finished
listener - object for callback
Throws:
OctopusException - if backup failed while in octopus mode
BackupException - if backup failed for other reasons

storeBackendsInfo

public void storeBackendsInfo(java.lang.String databaseName,
                              java.util.ArrayList backends)
Store all the backends checkpoint in the recoverylog

Parameters:
databaseName - the virtual database name
backends - the Arraylist of backends

removeCheckpoint

public void removeCheckpoint(java.lang.String checkpointName)
                      throws java.sql.SQLException
Remove a checkpoint and corresponding entries from the log table

Parameters:
checkpointName - to remove
Throws:
java.sql.SQLException - if fails

getVirtualDatabase

public VirtualDatabase getVirtualDatabase()
Returns the vdb value.

Returns:
Returns the vdb.

setDatabaseSchema

public void setDatabaseSchema(DatabaseSchema schema,
                              boolean isStatic)
Sets the DatabaseSchema to be able to parse the requests and find dependencies.

Parameters:
schema - a DatabaseSchema value
isStatic - true if the given schema is static

mergeDatabaseSchema

public void mergeDatabaseSchema(DatabaseSchema backendSchema)
Merge the given schema with the existing database schema.

Parameters:
backendSchema - The virtual database schema to merge.

setBackupManager

public void setBackupManager(BackupManager currentBackupManager)
Sets the backup manager for this recovery log

Parameters:
currentBackupManager - an instance of BackupManager

getBackupManager

public BackupManager getBackupManager()
Returns the backupManager value.

Returns:
Returns the backupManager.

getDatabaseSchema

public DatabaseSchema getDatabaseSchema()
Get the DatabaseSchema used by this Request Manager.

Returns:
a DatabaseSchema value

getLoadBalancer

public AbstractLoadBalancer getLoadBalancer()
Get the Request Load Balancer used in this Request Controller.

Returns:
an AbstractLoadBalancer value

setLoadBalancer

public void setLoadBalancer(AbstractLoadBalancer loadBalancer)
Set the Request Load Balancer to use in this Request Controller.

Parameters:
loadBalancer - a Request Load Balancer implementation

getResultCache

public AbstractResultCache getResultCache()
Get the result cache (if any) used in this Request Manager.

Returns:
an AbstractResultCache value or null if no Reqsult Cache has been defined

getMetadataCache

public MetadataCache getMetadataCache()
Returns the metadataCache value.

Returns:
Returns the metadataCache.

setMetadataCache

public void setMetadataCache(MetadataCache metadataCache)
Sets the metadataCache value.

Parameters:
metadataCache - The metadataCache to set.

setParsingCache

public void setParsingCache(ParsingCache parsingCache)
Sets the ParsingCache.

Parameters:
parsingCache - The parsingCache to set.

getRecoveryLog

public AbstractRecoveryLog getRecoveryLog()
Returns the Recovery Log Manager.

Returns:
AbstractRecoveryLog

setRecoveryLog

public void setRecoveryLog(AbstractRecoveryLog recoveryLog)
Sets the Recovery Log Manager.

Parameters:
recoveryLog - The log recovery to set

setResultCache

public void setResultCache(AbstractResultCache cache)
Set the Request Cache to use in this Request Controller.

Parameters:
cache - a Request Cache implementation

getScheduler

public AbstractScheduler getScheduler()
Get the Request Scheduler (if any) used in this Request Controller.

Returns:
an AbstractScheduler value or null if no Request Scheduler has been defined

setScheduler

public void setScheduler(AbstractScheduler scheduler)
Set the Request Scheduler to use in this Request Controller.

Parameters:
scheduler - a Request Scheduler implementation

setCaseSensitiveParsing

public void setCaseSensitiveParsing(boolean isCaseSensitiveParsing)
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).

Specified by:
setCaseSensitiveParsing in interface RequestManagerMBean
Parameters:
isCaseSensitiveParsing - true if parsing is case sensitive

getRequiredParsingGranularity

public int getRequiredParsingGranularity()
Specified by:
getRequiredParsingGranularity in interface RequestManagerMBean
Returns:
the parsing granularity required by the current configuration

getXml

public java.lang.String getXml()
Get xml information about this Request Manager

Specified by:
getXml in interface XmlComponent
Returns:
String in xml formatted text

getBackendStateListener

public BackendStateListener getBackendStateListener()
Returns the backendStateListener value.

Returns:
Returns the backendStateListener.

getBeginTimeout

public long getBeginTimeout()
Returns the beginTimeout value.

Specified by:
getBeginTimeout in interface RequestManagerMBean
Returns:
Returns the beginTimeout.

setBeginTimeout

public void setBeginTimeout(long beginTimeout)
Sets the beginTimeout value.

Specified by:
setBeginTimeout in interface RequestManagerMBean
Parameters:
beginTimeout - The beginTimeout to set.

getCacheParsingranularity

public int getCacheParsingranularity()
Returns the cacheParsingranularity value.

Specified by:
getCacheParsingranularity in interface RequestManagerMBean
Returns:
Returns the cacheParsingranularity.

setCacheParsingranularity

public void setCacheParsingranularity(int cacheParsingranularity)
Sets the cacheParsingranularity value.

Specified by:
setCacheParsingranularity in interface RequestManagerMBean
Parameters:
cacheParsingranularity - The cacheParsingranularity to set.

getCommitTimeout

public long getCommitTimeout()
Returns the commitTimeout value.

Specified by:
getCommitTimeout in interface RequestManagerMBean
Returns:
Returns the commitTimeout.

setCommitTimeout

public void setCommitTimeout(long commitTimeout)
Sets the commitTimeout value.

Specified by:
setCommitTimeout in interface RequestManagerMBean
Parameters:
commitTimeout - The commitTimeout to set.

getLoadBalancerParsingranularity

public int getLoadBalancerParsingranularity()
Returns the loadBalancerParsingranularity value.

Specified by:
getLoadBalancerParsingranularity in interface RequestManagerMBean
Returns:
Returns the loadBalancerParsingranularity.

setLoadBalancerParsingranularity

public void setLoadBalancerParsingranularity(int loadBalancerParsingranularity)
Sets the loadBalancerParsingranularity value.

Specified by:
setLoadBalancerParsingranularity in interface RequestManagerMBean
Parameters:
loadBalancerParsingranularity - The loadBalancerParsingranularity to set.

getRequiredGranularity

public int getRequiredGranularity()
Returns the requiredGranularity value.

Specified by:
getRequiredGranularity in interface RequestManagerMBean
Returns:
Returns the requiredGranularity.

setRequiredGranularity

public void setRequiredGranularity(int requiredGranularity)
Sets the requiredGranularity value.

Specified by:
setRequiredGranularity in interface RequestManagerMBean
Parameters:
requiredGranularity - The requiredGranularity to set.

getRollbackTimeout

public long getRollbackTimeout()
Returns the rollbackTimeout value.

Specified by:
getRollbackTimeout in interface RequestManagerMBean
Returns:
Returns the rollbackTimeout.

setRollbackTimeout

public void setRollbackTimeout(long rollbackTimeout)
Sets the rollbackTimeout value.

Specified by:
setRollbackTimeout in interface RequestManagerMBean
Parameters:
rollbackTimeout - The rollbackTimeout to set.

getSchedulerParsingranularity

public int getSchedulerParsingranularity()
Returns the schedulerParsingranularity value.

Specified by:
getSchedulerParsingranularity in interface RequestManagerMBean
Returns:
Returns the schedulerParsingranularity.

setSchedulerParsingranularity

public void setSchedulerParsingranularity(int schedulerParsingranularity)
Sets the schedulerParsingranularity value.

Specified by:
setSchedulerParsingranularity in interface RequestManagerMBean
Parameters:
schedulerParsingranularity - The schedulerParsingranularity to set.

isSchemaIsStatic

public boolean isSchemaIsStatic()
Returns the schemaIsStatic value.

Specified by:
isSchemaIsStatic in interface RequestManagerMBean
Returns:
Returns the schemaIsStatic.

setSchemaIsStatic

public void setSchemaIsStatic(boolean schemaIsStatic)
Sets the schemaIsStatic value.

Specified by:
setSchemaIsStatic in interface RequestManagerMBean
Parameters:
schemaIsStatic - The schemaIsStatic to set.

isCaseSensitiveParsing

public boolean isCaseSensitiveParsing()
Returns the isCaseSensitiveParsing value.

Specified by:
isCaseSensitiveParsing in interface RequestManagerMBean
Returns:
Returns the isCaseSensitiveParsing.

getAssociatedString

public java.lang.String getAssociatedString()
Description copied from class: AbstractStandardMBean
Allow to retrieve internationalization description on mbeans as well

Specified by:
getAssociatedString in class AbstractStandardMBean
Returns:
part of the key to look for in the translation file.
See Also:
AbstractStandardMBean.getAssociatedString()


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