|
|||||||||||
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 |
backupBackendWithCheckpoint(java.lang.String backendName,
java.lang.String checkpointName,
java.util.ArrayList tables)
Create a back up of a specific backend Note the backend will be disabled during backup, and will be put back to its previous state after backup. |
void |
callBackupManager(boolean backup,
java.lang.String backendName,
java.lang.String checkpoint,
java.util.ArrayList tables,
boolean enableAfter,
BackupListener listener)
Call the backup manager on the given 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 |
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 |
enableAllBackendsFromRecovery(java.lang.String checkpoint)
This emulates the method enableAllBackend() except it tries to get previous backend states from the recovery log, and enable only the backends with a recorded state of enable. |
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. |
void |
enableBackendFromCheckpoint(java.lang.String databaseBackendName,
java.lang.String checkpointName,
boolean threaded)
Plays all the queries since the given checkpoint and enables the backend when it is completely synchronized. |
void |
enableBackendFromLastCheckpoint(java.lang.String backendName)
Enable the given backend from its last known checkpoint |
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 |
AbstractBlobFilter |
getBlobFilter()
Returns the blobFilter associated to this virtual database |
int |
getCurrentNbOfThreads()
Returns the currentNbOfThreads. |
java.lang.String |
getName()
Gets the virtual database name to be used by the client (C-JDBC driver) |
boolean |
hasRecoveryLog()
Indicate whether there is a recovery log 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 |
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 |
restoreBackendFromBackupCheckpoint(java.lang.String databaseBackendName,
java.lang.String checkpointName)
Recopy all the data of a previous dump recorded by octopus into the named 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 |
setBlobFilter(AbstractBlobFilter filter)
Sets the blob encoder |
void |
setMonitoringToActive(boolean active)
If a monitoring section exists, we can set the monitoring on or off by calling this method. |
void |
shutdown()
Shutdown a virtual database in fast mode, disconnect clients |
void |
transferBackend(java.lang.String backend,
java.lang.String controllerDestination)
Transfer the backend to the destinated controller. |
java.util.ArrayList |
viewAllBackendNames()
Get the name of all DatabaseBackend names. |
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 Note the method is only useful in distributed environment |
java.lang.String |
viewOwningController()
Name of the controller owning this virtual database |
Method Detail |
public void backupBackendWithCheckpoint(java.lang.String backendName, java.lang.String checkpointName, java.util.ArrayList tables) throws VirtualDatabaseException
backendName
- to backupcheckpointName
- to associate this backup withtables
- to copy or null if copy all
VirtualDatabaseException
- if failspublic java.lang.String getBackendInformation(java.lang.String backendName) throws VirtualDatabaseException
backendName
- the backend logical name
VirtualDatabaseException
- if an error occurspublic boolean hasRecoveryLog()
true
if the recovery log is defined and can be
accessed, false
otherwisepublic java.lang.String[] viewBackendInformation(java.lang.String backendName) throws VirtualDatabaseException
backendName
- the name of the backend
String[]
VirtualDatabaseException
- if an error occurspublic void enableBackend(java.lang.String databaseBackendName) throws VirtualDatabaseException
databaseBackendName
- The database backend logical name to enable
VirtualDatabaseException
- in case of communication-related errorpublic void enableBackendFromLastCheckpoint(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 checkpointpublic void enableBackendFromCheckpoint(java.lang.String databaseBackendName, java.lang.String checkpointName) throws VirtualDatabaseException
databaseBackendName
- The database backend logical name to enablecheckpointName
- the checkpoint name to restart from
VirtualDatabaseException
- in case of communication-related errorpublic void enableBackendFromCheckpoint(java.lang.String databaseBackendName, java.lang.String checkpointName, boolean threaded) throws VirtualDatabaseException
databaseBackendName
- The database backend logical name to enablecheckpointName
- the checkpoint name to restart fromthreaded
- if true do not wait for the end of the execution
before returning, and do not throw any Exception
.
Any message or error will be reported through jmx notification. if
false, the method is blocked until the recovery is
finished.
VirtualDatabaseException
- in case of communication-related errorpublic void disableBackend(java.lang.String databaseBackendName) throws VirtualDatabaseException
databaseBackendName
- The database backend logical name to enable
VirtualDatabaseException
- in case of communication-related errorpublic void restoreBackendFromBackupCheckpoint(java.lang.String databaseBackendName, java.lang.String checkpointName) throws VirtualDatabaseException, BackupException, OctopusException
enableBackendFromCheckpoint
after this.
databaseBackendName
- the name of the backend to restorecheckpointName
- the name of the checkpoint that has a dump
VirtualDatabaseException
- if cannot access the backend from its name
OctopusException
- if backup failed while in octopus mode
BackupException
- if backup failed for other reasonspublic void disableBackendForCheckpoint(java.lang.String databaseBackendName, java.lang.String checkpointName) throws VirtualDatabaseException
databaseBackendName
- The database backend logical name to disablecheckpointName
- the checkpoint name to store
VirtualDatabaseException
- in case of communication-related errorpublic java.lang.String getName()
public java.util.ArrayList viewCheckpointNames()
ArrayList
of checkpoint names. Can be emptypublic 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.util.ArrayList viewAllBackendNames() throws VirtualDatabaseException
ArrayList
of String
representing database backend names
VirtualDatabaseException
- if an error occurspublic java.util.Hashtable viewGroupBackends() throws VirtualDatabaseException
Hashtable
of controllerName --> ArrayList of backend
names
VirtualDatabaseException
- if cannot return the resultpublic void enableAllBackend() throws VirtualDatabaseException
VirtualDatabaseException
- if failspublic void enableAllBackend(java.lang.String checkpoint) throws VirtualDatabaseException
checkpoint
- the checkpoint for the recovery log
VirtualDatabaseException
- if failspublic void enableAllBackendsFromRecovery(java.lang.String checkpoint) throws VirtualDatabaseException
checkpoint
- the checkpoint for the recovery log
VirtualDatabaseException
- if failspublic void disableAllBackend() throws VirtualDatabaseException
VirtualDatabaseException
- if failspublic void disableAllBackendForCheckpoint(java.lang.String checkpoint) throws VirtualDatabaseException
checkpoint
- the name of the checkpoitn
VirtualDatabaseException
- if failspublic void removeCheckpoint(java.lang.String checkpoint) throws VirtualDatabaseException
checkpoint
- the name of the checkpoitn
VirtualDatabaseException
- if failspublic boolean checkAdminAuthentication(java.lang.String adminLogin, java.lang.String adminPassword) throws VirtualDatabaseException
adminLogin
- usernameadminPassword
- password
VirtualDatabaseException
- if database does not existspublic void shutdown() throws VirtualDatabaseException
VirtualDatabaseException
- if failspublic void setBackendLastKnownCheckpoint(java.lang.String backendName, java.lang.String checkpoint) throws VirtualDatabaseException
backendName
- backendcheckpoint
- checkpoint
VirtualDatabaseException
- if failspublic java.lang.String viewOwningController()
public boolean isDistributed()
true
if the database is distributed among multiple
controllers false
if it exists on a single
controller onlypublic 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 backendpublic java.lang.String[][] retrieveBackendsData() throws java.lang.Exception
String[][]
of formatted data for all backends
java.lang.Exception
- if failspublic java.lang.String[] viewControllerList()
viewOwningController
otherwise returns an array of
controller configuring this DistributedVirtualDatabase
String[]
of controller names.public void removeBackend(java.lang.String backend) throws VirtualDatabaseException
backend
- the name of the backend to remove
VirtualDatabaseException
- if the backend does not existpublic 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 failedpublic void callBackupManager(boolean backup, java.lang.String backendName, java.lang.String checkpoint, java.util.ArrayList tables, boolean enableAfter, BackupListener listener) throws VirtualDatabaseException
backup
- true if this is a backup, false if this is a restore processbackendName
- the name of the backendcheckpoint
- the name of the checkpoint associated with the processtables
- the tables to consider while performing the copyenableAfter
- should be enable the backend automatically afterlistener
- callback object to notify of the end of the process
VirtualDatabaseException
- if failspublic 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 void setBlobFilter(AbstractBlobFilter filter)
filter
- blob encodepublic AbstractBlobFilter getBlobFilter()
public int getCurrentNbOfThreads()
public void setMonitoringToActive(boolean active) throws VirtualDatabaseException
active
- should set the monitor to on or off
VirtualDatabaseException
- if there is no monitor.public void cleanMonitoringData() throws VirtualDatabaseException
VirtualDatabaseException
- if there is no monitor.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |