|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
JMX Interface to remotely manage a Virtual Databases.
| Method Summary | |
void |
backupBackend(java.lang.String backendName,
java.lang.String login,
java.lang.String password,
java.lang.String dumpName,
java.lang.String backuperName,
java.lang.String path,
java.util.ArrayList tables)
Create a backup of a specific backend. |
boolean |
checkAdminAuthentication(java.lang.String adminLogin,
java.lang.String adminPassword)
Authenticate a user for a given virtual database |
void |
cleanMonitoringData()
Clean data collected by the current monitoring system, to avoid memory problems. |
void |
copyDump(java.lang.String dumpName,
java.lang.String remoteControllerName)
Copy a local dump over to a remote member of this distributed vdb, making it available for restore operation. |
void |
copyLogFromCheckpoint(java.lang.String dumpName,
java.lang.String controllerName)
Copies a chunk of the local virtual database recovery log onto a remote controller's peer virtual database log. |
void |
deleteLogUpToCheckpoint(java.lang.String checkpointName)
Deletes the recovery log (if any) from the begining upto the specified checkpoint. |
void |
disableAllBackends()
Disable all backends for this virtual database |
void |
disableAllBackendsWithCheckpoint(java.lang.String checkpoint)
Disable all backends and store a checkpoint |
void |
disableBackendWithCheckpoint(java.lang.String databaseBackendName)
Disables a backend once all the pending write queries are executed. |
void |
enableAllBackends()
Enable all the backends without any check. |
void |
enableAllBackendsFromCheckpoint()
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. |
void |
enableBackendFromCheckpoint(java.lang.String backendName)
Enable the given backend from its last known checkpoint |
void |
forceDisableBackend(java.lang.String databaseBackendName)
Disables a backend that is currently enabled on this virtual database (without further check). |
void |
forceEnableBackend(java.lang.String databaseBackendName)
Enables a backend that has been previously added to this virtual database and that is in the disabled state. |
java.util.ArrayList |
getAllBackendNames()
Get a list of all DatabaseBackend names. |
DumpInfo[] |
getAvailableDumps()
Get all available dump info for this virtual database |
java.lang.String |
getBackendInformation(java.lang.String backendName)
Return information about the specified backend. |
java.lang.String |
getBackendSchema(java.lang.String backendName)
The getXml() method does not return the schema if it is not static anymore, to avoid confusion between static and dynamic schema. |
java.lang.String |
getBackendState(java.lang.String backendName)
Return the state of a given database backend |
BackendStatistics |
getBackendStatistics(java.lang.String backendName)
Retrieves an array of statistics of the given backend for this virtual database |
java.lang.String[] |
getBackuperNames()
Get the names of the Backupers available from this
BackupManager. |
int |
getCurrentNbOfThreads()
Returns the currentNbOfThreads. |
java.lang.String |
getDumpFormatForBackuper(java.lang.String backuperName)
Get the dump format associated to a given Backuper |
java.lang.String |
getVirtualDatabaseName()
Gets the virtual database name to be used by the client (C-JDBC driver) |
java.lang.String |
getXml()
Retrieves this VirtualDatabase object in xml format |
boolean |
hasRecoveryLog()
Indicate if there is a recovery log defined for this virtual database |
boolean |
hasResultCache()
Indicate if there is a result cache defined for this virtual database |
boolean |
isDistributed()
Tells whether this database is distributed or not |
void |
removeBackend(java.lang.String backend)
Remove a backend from the virtual database list. |
void |
removeCheckpoint(java.lang.String checkpoint)
Disable all backends and store a checkpoint |
boolean |
removeDump(java.lang.String dumpName)
Remove a dump from the controller repository |
void |
replicateBackend(java.lang.String backendName,
java.lang.String newBackendName,
java.util.Map parameters)
Add an additionnal backend to the virtual database with connection managers identical to the backend replicated. |
void |
restoreDumpOnBackend(java.lang.String databaseBackendName,
java.lang.String login,
java.lang.String password,
java.lang.String dumpName,
java.util.ArrayList tables)
Restore a dump on a specific backend. |
java.lang.String[][] |
retrieveBackendsData()
Retrieves an array of data on the backends for this virtual database |
void |
setBackendLastKnownCheckpoint(java.lang.String backendName,
java.lang.String checkpoint)
Sets the last known checkpoint of a backend. |
void |
setMonitoringToActive(boolean active)
If a monitoring section exists, we can set the monitoring on or off by calling this method. |
void |
shutdown(int level)
Shutdown this virtual database. |
void |
transferBackend(java.lang.String backend,
java.lang.String controllerDestination)
Transfer the backend to the destinated controller. |
void |
transferDump(java.lang.String dumpName,
java.lang.String remoteControllerName,
boolean noCopy)
Transfer specified dump over to specified vdb's controller, making it available for restore operation. |
void |
updateDumpPath(java.lang.String dumpName,
java.lang.String newPath)
Update the path of the dump for a given dumpName. |
java.lang.String[] |
viewBackendInformation(java.lang.String backendName)
Returns an array of information on this backend The method above is not used at the moment ... |
java.util.ArrayList |
viewCheckpointNames()
Returns an array of names of all the checkpoint available in the recovery log of this virtual dabase. |
java.lang.String[] |
viewControllerList()
Return the list of controllers defining this virtual database. |
java.util.Hashtable |
viewGroupBackends()
Returns a mapping of controller jmx names with their backends. |
java.lang.String |
viewOwningController()
Name of the controller owning this virtual database |
| Method Detail |
public void forceEnableBackend(java.lang.String databaseBackendName)
throws VirtualDatabaseException
databaseBackendName - The database backend logical name to enable
VirtualDatabaseException - in case of communication-related error
public void enableBackendFromCheckpoint(java.lang.String backendName)
throws VirtualDatabaseException
backendName - the name of the backend to enable
VirtualDatabaseException - if enable failed, or if there is no last
known checkpoint
public void enableAllBackends()
throws VirtualDatabaseException
VirtualDatabaseException - if fails
public void enableAllBackendsFromCheckpoint()
throws VirtualDatabaseException
VirtualDatabaseException - if fails
public void forceDisableBackend(java.lang.String databaseBackendName)
throws VirtualDatabaseException
databaseBackendName - The database backend logical name to enable
VirtualDatabaseException - in case of communication-related error
public void disableBackendWithCheckpoint(java.lang.String databaseBackendName)
throws VirtualDatabaseException
databaseBackendName - The database backend logical name to disable
VirtualDatabaseException - in case of communication-related error
public void disableAllBackends()
throws VirtualDatabaseException
VirtualDatabaseException - if fails
public void disableAllBackendsWithCheckpoint(java.lang.String checkpoint)
throws VirtualDatabaseException
checkpoint - the name of the checkpoitn
VirtualDatabaseException - if fails
public java.util.ArrayList getAllBackendNames()
throws VirtualDatabaseException
ArrayList of String
representing database backend names
VirtualDatabaseException - if an error occurs
public void replicateBackend(java.lang.String backendName,
java.lang.String newBackendName,
java.util.Map parameters)
throws VirtualDatabaseException
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
VirtualDatabaseException - if cannot replicate backend
public void removeBackend(java.lang.String backend)
throws VirtualDatabaseException
backend - the name of the backend to remove
VirtualDatabaseException - if the backend does not exist
public void transferBackend(java.lang.String backend,
java.lang.String controllerDestination)
throws VirtualDatabaseException
backend - the backend to transfercontrollerDestination - the controller to copy the backend to
VirtualDatabaseException - if transfer failed
public void copyLogFromCheckpoint(java.lang.String dumpName,
java.lang.String controllerName)
throws VirtualDatabaseException
dumpName - the name of the dump (which gives associated checkpoint)
from which to perform the copy.controllerName - the remote controller to send the copy to
VirtualDatabaseException - if there is no recovery log, or the
virtual database is not distributed, or in case of error.
public void deleteLogUpToCheckpoint(java.lang.String checkpointName)
throws VirtualDatabaseException
checkpointName - the name of the checkpoint upto which to delete the
recovery log.
VirtualDatabaseException - if there is no recovery log, or in case of
error.
public void removeCheckpoint(java.lang.String checkpoint)
throws VirtualDatabaseException
checkpoint - the name of the checkpoitn
VirtualDatabaseException - if fails
public void setBackendLastKnownCheckpoint(java.lang.String backendName,
java.lang.String checkpoint)
throws VirtualDatabaseException
backendName - backendcheckpoint - checkpoint
VirtualDatabaseException - if failspublic java.util.ArrayList viewCheckpointNames()
ArrayList of checkpoint names. Can be emptypublic java.lang.String[] getBackuperNames()
Backupers available from this
BackupManager.
String representing
the name of the Backuperspublic java.lang.String getDumpFormatForBackuper(java.lang.String backuperName)
Backuper
backuperName - name associated to a Backuper
Backuper
public void backupBackend(java.lang.String backendName,
java.lang.String login,
java.lang.String password,
java.lang.String dumpName,
java.lang.String backuperName,
java.lang.String path,
java.util.ArrayList tables)
throws VirtualDatabaseException
backendName - the target backend to backuplogin - the login to use to connect to the database for the backup
operationpassword - the password to use to connect to the database for the
backup operationdumpName - the name of the dump to createbackuperName - the logical name of the backuper to usepath - the path where to store the dumptables - the list of tables to backup, null means all tables
VirtualDatabaseException - if the backup fails
public DumpInfo[] getAvailableDumps()
throws VirtualDatabaseException
DumpInfo containing the available dump
info for this virtual database. Cannot be null but can be empty.
VirtualDatabaseException - if cannot retrieve dump informations
public void updateDumpPath(java.lang.String dumpName,
java.lang.String newPath)
throws VirtualDatabaseException
dumpName - name of the dumpnewPath - new path for the dump
VirtualDatabaseException - if cannot update the pathpublic boolean removeDump(java.lang.String dumpName)
dumpName - name of the dump to remove
true if the dump was removed, false
otherwise
public void restoreDumpOnBackend(java.lang.String databaseBackendName,
java.lang.String login,
java.lang.String password,
java.lang.String dumpName,
java.util.ArrayList tables)
throws VirtualDatabaseException
This method disables the backend and leave it disabled after recovery
process. The user has to call the enableBackendFromCheckpoint
after this.
databaseBackendName - the name of the backend to restorelogin - the login to use to connect to the database for the restore
operationpassword - the password to use to connect to the database for the
restore operationdumpName - the name of the dump to restoretables - the list of tables to restore, null means all tables
VirtualDatabaseException - if the restore operation failed
public void copyDump(java.lang.String dumpName,
java.lang.String remoteControllerName)
throws VirtualDatabaseException
dumpName - the name of the dump to copy. Should exist locally, and not
remotely.remoteControllerName - the remote controller to talk to.
VirtualDatabaseException - in case of error.
public void transferDump(java.lang.String dumpName,
java.lang.String remoteControllerName,
boolean noCopy)
throws VirtualDatabaseException
dumpName - the name of the dump to copy. Should exist locally, and not
remotely.remoteControllerName - the remote controller to talk to.noCopy - specifies whether or not to actually copy the dump. Default:
false. No-copy is a useful option in case of NFS/shared dumps.
VirtualDatabaseException - in case of error
public java.lang.String getBackendInformation(java.lang.String backendName)
throws VirtualDatabaseException
backendName - the backend logical name
VirtualDatabaseException - if an error occurs
public java.lang.String getBackendSchema(java.lang.String backendName)
throws VirtualDatabaseException
backendName - the name of the backend to get the schema from
VirtualDatabaseException - if an error occurs while accessing the
backend, or if the backend does not exist.
public java.lang.String getBackendState(java.lang.String backendName)
throws VirtualDatabaseException
backendName - the name of the backend
String description of the database backend
VirtualDatabaseException - if failspublic java.lang.String getXml()
VirtualDatabase object in xml format
public boolean checkAdminAuthentication(java.lang.String adminLogin,
java.lang.String adminPassword)
throws VirtualDatabaseException
adminLogin - usernameadminPassword - password
VirtualDatabaseException - if database does not existspublic java.lang.String getVirtualDatabaseName()
public boolean hasRecoveryLog()
true if the recovery log is defined and can be
accessed, false otherwisepublic boolean hasResultCache()
true if a request cache is defined and can be
accessed, false otherwisepublic boolean isDistributed()
true if the database is distributed among multiple
controllers false if it exists on a single
controller only
public void shutdown(int level)
throws VirtualDatabaseException
level - Constants.SHUTDOWN_WAIT, Constants.SHUTDOWN_SAFE or
Constants.SHUTDOWN_FORCE
VirtualDatabaseException - if an error occurs
public java.lang.String[] viewBackendInformation(java.lang.String backendName)
throws VirtualDatabaseException
backendName - the name of the backend
String[]
VirtualDatabaseException - if an error occurs
public java.util.Hashtable viewGroupBackends()
throws VirtualDatabaseException
Hashtable of controllerName -->
ArrayList[BackendInfo]
VirtualDatabaseException - if cannot return the resultpublic java.lang.String viewOwningController()
public java.lang.String[][] retrieveBackendsData()
throws java.lang.Exception
String[][] of formatted data for all backends
java.lang.Exception - if fails
public BackendStatistics getBackendStatistics(java.lang.String backendName)
throws java.lang.Exception
backendName - name of the backend
BackendStatistics[] of formatted data for all
backends or null if the backend does not exist
java.lang.Exception - if failspublic java.lang.String[] viewControllerList()
viewOwningController otherwise returns an array of
controller configuring this DistributedVirtualDatabase
String[] of controller names.public int getCurrentNbOfThreads()
public void cleanMonitoringData()
throws VirtualDatabaseException
VirtualDatabaseException - if there is no monitor.
public void setMonitoringToActive(boolean active)
throws VirtualDatabaseException
active - should set the monitor to on or off
VirtualDatabaseException - if there is no monitor.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||