Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean Interface Reference

List of all members.

Public Member Functions

void enableBackend (String databaseBackendName) throws VirtualDatabaseException

Package Functions

void enableBackendFromCheckpoint (String backendName) throws VirtualDatabaseException
void enableAllBackends () throws VirtualDatabaseException
void enableAllBackendsFromCheckpoint () throws VirtualDatabaseException
void disableBackend (String databaseBackendName) throws VirtualDatabaseException
void disableBackendWithCheckpoint (String databaseBackendName, String checkpointName) throws VirtualDatabaseException
void disableAllBackends () throws VirtualDatabaseException
void disableAllBackendsWithCheckpoint (String checkpoint) throws VirtualDatabaseException
ArrayList getAllBackendNames () throws VirtualDatabaseException
void replicateBackend (String backendName, String newBackendName, Map parameters) throws VirtualDatabaseException
void removeBackend (String backend) throws VirtualDatabaseException
void transferBackend (String backend, String controllerDestination) throws VirtualDatabaseException
void removeCheckpoint (String checkpoint) throws VirtualDatabaseException
void setBackendLastKnownCheckpoint (String backendName, String checkpoint) throws VirtualDatabaseException
ArrayList viewCheckpointNames ()
void backupBackendWithCheckpoint (String backendName, String checkpointName, ArrayList tables) throws VirtualDatabaseException
File[] getAvailableDumpFiles ()
boolean removeDumpFile (File dumpFile)
void restoreDumpOnBackend (String databaseBackendName, String checkpointName) throws VirtualDatabaseException, BackupException, OctopusException
String getBackendInformation (String backendName) throws VirtualDatabaseException
String getBackendSchema (String backendName) throws VirtualDatabaseException
String getBackendState (String backendName) throws VirtualDatabaseException
String getXml ()
boolean checkAdminAuthentication (String adminLogin, String adminPassword) throws VirtualDatabaseException
String getVirtualDatabaseName ()
boolean hasRecoveryLog ()
boolean hasResultCache ()
boolean isDistributed ()
void shutdown (int level) throws VirtualDatabaseException
String[] viewBackendInformation (String backendName) throws VirtualDatabaseException
Hashtable viewGroupBackends () throws VirtualDatabaseException
String viewOwningController ()
String[][] retrieveBackendsData () throws Exception
String[] viewControllerList ()
int getCurrentNbOfThreads ()
void cleanMonitoringData () throws VirtualDatabaseException
void setMonitoringToActive (boolean active) throws VirtualDatabaseException

Detailed Description

JMX Interface to remotely manage a Virtual Databases.

Author:
Emmanuel Cecchet

Nicolas Modrzyk

Version:
1.0

Definition at line 43 of file VirtualDatabaseMBean.java.


Member Function Documentation

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.backupBackendWithCheckpoint String  backendName,
String  checkpointName,
ArrayList  tables
throws VirtualDatabaseException [package]
 

Create a backup of a specific backend. Note the backend will be disabled during backup, and will be put back to its previous state after backup.

Parameters:
backendName to backup
checkpointName to associate this backup with
tables to copy or null if copy all
Exceptions:
VirtualDatabaseException if fails

boolean org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.checkAdminAuthentication String  adminLogin,
String  adminPassword
throws VirtualDatabaseException [package]
 

Authenticate a user for a given virtual database

Parameters:
adminLogin username
adminPassword password
Returns:
true if authentication is a success, false otherwise
Exceptions:
VirtualDatabaseException if database does not exists

Referenced by org.objectweb.cjdbc.console.text.module.VirtualDatabaseAdmin.login(), and org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionLoadAuthenticatedDatabase().

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.cleanMonitoringData  )  throws VirtualDatabaseException [package]
 

Clean data collected by the current monitoring system, to avoid memory problems. Monitor does not have to be active.

Exceptions:
VirtualDatabaseException if there is no monitor.

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.disableAllBackends  )  throws VirtualDatabaseException [package]
 

Disable all backends for this virtual database

Exceptions:
VirtualDatabaseException if fails

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.DisableAll.parse().

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.disableAllBackendsWithCheckpoint String  checkpoint  )  throws VirtualDatabaseException [package]
 

Disable all backends and store a checkpoint

Parameters:
checkpoint the name of the checkpoitn
Exceptions:
VirtualDatabaseException if fails

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.DisableAll.parse().

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.disableBackend String  databaseBackendName  )  throws VirtualDatabaseException [package]
 

Disables a backend that is currently enabled on this virtual database (without further check).

Parameters:
databaseBackendName The database backend logical name to enable
Exceptions:
VirtualDatabaseException in case of communication-related error

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.Disable.parse(), and org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionExecuteBackendDrop().

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.disableBackendWithCheckpoint String  databaseBackendName,
String  checkpointName
throws VirtualDatabaseException [package]
 

Disables a backend once all the pending write queries are executed. A checkpoint is inserted in the recovery log. The backend must belong to this virtual database and be in the enabled state.

Parameters:
databaseBackendName The database backend logical name to disable
checkpointName the checkpoint name to store
Exceptions:
VirtualDatabaseException in case of communication-related error

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.Disable.parse(), and org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionExecuteBackendDrop().

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.enableAllBackends  )  throws VirtualDatabaseException [package]
 

Enable all the backends without any check.

Exceptions:
VirtualDatabaseException if fails

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.enableAllBackendsFromCheckpoint  )  throws VirtualDatabaseException [package]
 

Enable all backends from their last known states that has been recorded in the recovery log, and enable only the backends which where properly disabled.

Exceptions:
VirtualDatabaseException if fails

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.EnableAll.parse().

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.enableBackend String  databaseBackendName  )  throws VirtualDatabaseException
 

Enables 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.

Parameters:
databaseBackendName The database backend logical name to enable
Exceptions:
VirtualDatabaseException in case of communication-related error

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.Enable.parse(), and org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionExecuteBackendDrop().

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.enableBackendFromCheckpoint String  backendName  )  throws VirtualDatabaseException [package]
 

Enable the given backend from its last known checkpoint

Parameters:
backendName the name of the backend to enable
Exceptions:
VirtualDatabaseException if enable failed, or if there is no last known checkpoint

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.EnableWrite.parse(), org.objectweb.cjdbc.console.text.commands.dbadmin.Enable.parse(), and org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionExecuteBackendDrop().

ArrayList org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.getAllBackendNames  )  throws VirtualDatabaseException [package]
 

Get a list of all DatabaseBackend names.

Returns:
ArrayList ArrayList of String representing database backend names
Exceptions:
VirtualDatabaseException if an error occurs

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.ShowBackendState.parse(), and org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionLoadBackendsList().

File [] org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.getAvailableDumpFiles  )  [package]
 

Get all available dump files for this virtual database

Returns:
an array of File containing the available files. Cannot be null but can be empty.

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.ViewDumpNames.parse(), and org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionLoadDumpList().

String org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.getBackendInformation String  backendName  )  throws VirtualDatabaseException [package]
 

Return information about the specified backend.

Parameters:
backendName the backend logical name
Returns:
String the backend information
Exceptions:
VirtualDatabaseException if an error occurs

String org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.getBackendSchema String  backendName  )  throws VirtualDatabaseException [package]
 

The getXml() method does not return the schema if it is not static anymore, to avoid confusion between static and dynamic schema. This method returns a static view of the schema, whatever the dynamic precision is.

Parameters:
backendName the name of the backend to get the schema from
Returns:
an xml formatted string
Exceptions:
VirtualDatabaseException if an error occurs while accessing the backend, or if the backend does not exist.

String org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.getBackendState String  backendName  )  throws VirtualDatabaseException [package]
 

Return the state of a given database backend

Parameters:
backendName the name of the backend
Returns:
String description of the database backend
Exceptions:
VirtualDatabaseException if fails

int org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.getCurrentNbOfThreads  )  [package]
 

Returns the currentNbOfThreads.

Returns:
int

String org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.getVirtualDatabaseName  )  [package]
 

Gets the virtual database name to be used by the client (C-JDBC driver)

Returns:
the virtual database name

String org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.getXml  )  [package]
 

Retrieves this VirtualDatabase object in xml format

Returns:
xml formatted string that conforms to c-jdbc.dtd

Referenced by org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionLoadXmlDatabase().

boolean org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.hasRecoveryLog  )  [package]
 

Indicate if there is a recovery log defined for this virtual database

Returns:
true if the recovery log is defined and can be accessed, false otherwise

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.EnableWrite.parse(), org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionExecuteBackendDrop(), and org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionLoadAuthenticatedDatabase().

boolean org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.hasResultCache  )  [package]
 

Indicate if there is a result cache defined for this virtual database

Returns:
true if a request cache is defined and can be accessed, false otherwise

boolean org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.isDistributed  )  [package]
 

Tells whether this database is distributed or not

Returns:
true if the database is distributed among multiple controllers false if it exists on a single controller only

Referenced by org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionLoadBackendsList().

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.removeBackend String  backend  )  throws VirtualDatabaseException [package]
 

Remove a backend from the virtual database list. Do not check whether it is enabled or not, and do not perform backup operation

Parameters:
backend the name of the backend to remove
Exceptions:
VirtualDatabaseException if the backend does not exist

Referenced by org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionRemoveBackend().

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.removeCheckpoint String  checkpoint  )  throws VirtualDatabaseException [package]
 

Disable all backends and store a checkpoint

Parameters:
checkpoint the name of the checkpoitn
Exceptions:
VirtualDatabaseException if fails

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.RemoveCheckpoint.parse().

boolean org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.removeDumpFile File  dumpFile  )  [package]
 

Delete a dump file from the controller repository

Parameters:
dumpFile the file reference of the dumpFile
Returns:
true deletion was completed, false otherwise

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.RemoveDumpFile.parse(), and org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionDeleteDump().

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.replicateBackend String  backendName,
String  newBackendName,
Map  parameters
throws VirtualDatabaseException [package]
 

Add an additionnal backend to the virtual database with connection managers identical to the backend replicated.

Parameters:
backendName the backend to replicate and to use parameters from.
newBackendName the new backend name.
parameters parameters to override or modify when replicating to the new backend
Exceptions:
VirtualDatabaseException if cannot replicate backend

Referenced by org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionCreateBackendExecute().

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.restoreDumpOnBackend String  databaseBackendName,
String  checkpointName
throws VirtualDatabaseException, BackupException, OctopusException [package]
 

Recopy all the data of a previous dump recorded by octopus into the named backend. This disables the backend and leave it disabled after recovery process. The user has to call the enableBackendFromCheckpoint after this.

Parameters:
databaseBackendName the name of the backend to restore
checkpointName the name of the checkpoint that has a dump
Exceptions:
VirtualDatabaseException if cannot access the backend from its name
OctopusException if backup failed while in octopus mode
BackupException if backup failed for other reasons

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.Restore.parse().

String [][] org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.retrieveBackendsData  )  throws Exception [package]
 

Retrieves an array of data on the backends for this virtual database

Returns:
String[][] of formatted data for all backends
Exceptions:
Exception if fails

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.ShowBackends.parse().

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.setBackendLastKnownCheckpoint String  backendName,
String  checkpoint
throws VirtualDatabaseException [package]
 

Sets the last known checkpoint of a backend. This will also update the value in the recovery log

Parameters:
backendName backend
checkpoint checkpoint
Exceptions:
VirtualDatabaseException if fails

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.setMonitoringToActive boolean  active  )  throws VirtualDatabaseException [package]
 

If a monitoring section exists, we can set the monitoring on or off by calling this method. If monitoring is not defined we throw an exception.

Parameters:
active should set the monitor to on or off
Exceptions:
VirtualDatabaseException if there is no monitor.

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.shutdown int  level  )  throws VirtualDatabaseException [package]
 

Shutdown this virtual database. Finish all threads and stop connection to backends

Parameters:
level Constants.SHUTDOWN_WAIT, Constants.SHUTDOWN_SAFE or Constants.SHUTDOWN_FORCE
Exceptions:
VirtualDatabaseException if an error occurs

Referenced by org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionShutdownDatabase().

void org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.transferBackend String  backend,
String  controllerDestination
throws VirtualDatabaseException [package]
 

Transfer the backend to the destinated controller. Note that this does nothing in a non-distributed environment

Parameters:
backend the backend to transfer
controllerDestination the controller to copy the backend to
Exceptions:
VirtualDatabaseException if transfer failed

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.TransferBackend.parse(), and org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionExecuteTransfer().

String [] org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.viewBackendInformation String  backendName  )  throws VirtualDatabaseException [package]
 

Returns an array of information on this backend The method above is not used at the moment ... This one is by the GUI.

Parameters:
backendName the name of the backend
Returns:
String[]
Exceptions:
VirtualDatabaseException if an error occurs

Referenced by org.objectweb.cjdbc.console.gui.CjdbcGui.actionSetBackendState().

ArrayList org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.viewCheckpointNames  )  [package]
 

Returns an array of names of all the checkpoint available in the recovery log of this virtual dabase.

Returns:
ArrayList of checkpoint names. Can be empty

Referenced by org.objectweb.cjdbc.console.text.commands.dbadmin.ViewCheckpointNames.parse().

String [] org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.viewControllerList  )  [package]
 

Return the list of controllers defining this virtual database. If the database is not distributed this returns the same as viewOwningController otherwise returns an array of controller configuring this DistributedVirtualDatabase

Returns:
String[] of controller names.

Referenced by org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionLoadAuthenticatedDatabase(), and org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionSelectNewDatabase().

Hashtable org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.viewGroupBackends  )  throws VirtualDatabaseException [package]
 

Returns a mapping of controller jmx names with their backends Note the method is only useful in distributed environment

Returns:
Hashtable of controllerName --> ArrayList of backend names
Exceptions:
VirtualDatabaseException if cannot return the result

Referenced by org.objectweb.cjdbc.console.gui.CjdbcGui.publicActionLoadBackendsList().

String org.objectweb.cjdbc.common.jmx.mbeans.VirtualDatabaseMBean.viewOwningController  )  [package]
 

Name of the controller owning this virtual database

Returns:
url of the controller


The documentation for this interface was generated from the following file:
Generated on Mon Apr 11 22:01:42 2005 for C-JDBC by  doxygen 1.3.9.1