org.objectweb.cjdbc.controller.virtualdatabase
Interface VirtualDatabaseMBean

All Known Implementing Classes:
VirtualDatabase

public interface VirtualDatabaseMBean

JMX Interface to remotely manage a Virtual Databases.

Version:
1.0
Author:
Emmanuel Cecchet

Method Summary
 boolean checkAdminAuthentication(java.lang.String adminLogin, java.lang.String adminPassword)
          Authenticate a user for a given virtual database
 void disableAllBackend()
          Disable all backends for this virtual database
 void disableAllBackendForCheckpoint(java.lang.String checkpoint)
          Disable all backends and store a checkpoint
 void disableBackend(java.lang.String databaseBackendName)
          Disables a backend that is currently enabled on this virtual database (without further check).
 void disableBackendForCheckpoint(java.lang.String databaseBackendName, java.lang.String checkpointName)
          Disables a backend once all the pending write queries are executed.
 void enableAllBackend()
          Prepare this virtual database for startup.
 void enableAllBackend(java.lang.String checkpoint)
          Prepare this virtual database for startup.
 void enableBackend(java.lang.String databaseBackendName)
          Enables a backend that has been previously added to this virtual database and that is in the disabled state.
 void enableBackendFromCheckpoint(java.lang.String databaseBackendName, java.lang.String checkpointName)
          Plays all the queries since the given checkpoint and enables the backend when it is completely synchronized.
 java.lang.String getBackendInformation(java.lang.String backendName)
          Return information about the specified backend.
 java.lang.String getName()
          Gets the virtual database name to be used by the client (C-JDBC driver)
 java.util.ArrayList viewAllBackendNames()
          Get the name of all DatabaseBackend names.
 

Method Detail

getBackendInformation

public java.lang.String getBackendInformation(java.lang.String backendName)
                                       throws VirtualDatabaseException
Return information about the specified backend.

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

enableBackend

public void enableBackend(java.lang.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
Throws:
VirtualDatabaseException - in case of communication-related error

enableBackendFromCheckpoint

public void enableBackendFromCheckpoint(java.lang.String databaseBackendName,
                                        java.lang.String checkpointName)
                                 throws VirtualDatabaseException
Plays all the queries since the given checkpoint and enables the backend when it is completely synchronized. The backend must have been previously added to this virtual database and be in the disabled state

Parameters:
databaseBackendName - The database backend logical name to enable
checkpointName - the checkpoint name to restart from
Throws:
VirtualDatabaseException - in case of communication-related error

disableBackend

public void disableBackend(java.lang.String databaseBackendName)
                    throws VirtualDatabaseException
Disables a backend that is currently enabled on this virtual database (without further check).

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

disableBackendForCheckpoint

public void disableBackendForCheckpoint(java.lang.String databaseBackendName,
                                        java.lang.String checkpointName)
                                 throws VirtualDatabaseException
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
Throws:
VirtualDatabaseException - in case of communication-related error

getName

public java.lang.String getName()
                         throws VirtualDatabaseException
Gets the virtual database name to be used by the client (C-JDBC driver)

Returns:
the virtual database name
Throws:
VirtualDatabaseException - in case of communication-related error

viewAllBackendNames

public java.util.ArrayList viewAllBackendNames()
                                        throws VirtualDatabaseException
Get the name of all DatabaseBackend names.

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

enableAllBackend

public void enableAllBackend()
                      throws VirtualDatabaseException
Prepare this virtual database for startup. This turns on all the backends

Throws:
VirtualDatabaseException - if fails

enableAllBackend

public void enableAllBackend(java.lang.String checkpoint)
                      throws VirtualDatabaseException
Prepare this virtual database for startup. This turns on all the backends

Parameters:
checkpoint - the checkpoint for the recovery log
Throws:
VirtualDatabaseException - if fails

disableAllBackend

public void disableAllBackend()
                       throws VirtualDatabaseException
Disable all backends for this virtual database

Throws:
VirtualDatabaseException - if fails

disableAllBackendForCheckpoint

public void disableAllBackendForCheckpoint(java.lang.String checkpoint)
                                    throws VirtualDatabaseException
Disable all backends and store a checkpoint

Parameters:
checkpoint - the name of the checkpoitn
Throws:
VirtualDatabaseException - if fails

checkAdminAuthentication

public boolean checkAdminAuthentication(java.lang.String adminLogin,
                                        java.lang.String adminPassword)
                                 throws VirtualDatabaseException
Authenticate a user for a given virtual database

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


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