| org.continuent.sequoia.common.jmx.mbeans.VirtualDatabaseMBean
All known Subclasses: org.continuent.sequoia.controller.virtualdatabase.management.VirtualDatabase,
Method Summary | |
void | abort(long transactionId, boolean logAbort, boolean forceAbort) Abort a transaction that has been started but in which no query was
executed. | void | backupBackend(String backendName, String login, String password, String dumpName, String backuperName, String path, boolean force, ArrayList tables) Create a backup of a specific backend. | void | backupBackend(String backendName, String login, String password, String dumpName, String backuperName, String path, ArrayList tables) This is backupBackend(force=true). | boolean | checkAdminAuthentication(String adminLogin, String adminPassword) | void | closePersistentConnection(String login, long persistentConnectionId) Close the given persistent connection. | void | copyLogFromCheckpoint(String dumpName, String controllerName) Copies a chunk of the local virtual database recovery log onto a remote
controller's peer virtual database log. | void | deleteDump(String dumpName, boolean keepsFile) Delete the dump entry associated to the dumpName .
If keepsFile is false, the dump file is also removed from
the file system. | void | deleteLogUpToCheckpoint(String checkpointName) Deletes the recovery log (if any) from the begining upto the specified
checkpoint. | void | disableBackendWithCheckpoint(String databaseBackendName) Disables a backend once all the pending write queries are executed. | void | enableBackendFromCheckpoint(String backendName) | void | forceDisableBackend(String databaseBackendName) Disables a backend that is currently enabled on this virtual database
(without further check). | void | forceEnableBackend(String databaseBackendName) Enables a backend that has been previously added to this virtual database
and that is in the disabled state. | List | getAllBackendNames() Get a list of all DatabaseBackend names. | DumpInfo[] | getAvailableDumps() Get all available dump info for this virtual database
an array of DumpInfo containing the available dumpinfo for this virtual database. | String | getBackendInformation(String backendName) Return information about the specified backend. | String | getBackendSchema(String backendName) The getXml() method does not return the schema if it is not static anymore,
to avoid confusion between static and dynamic schema. | BackendStatistics | getBackendStatistics(String backendName) | String[] | getBackuperNames() Get the names of the Backupers available from this
BackupManager . | String[] | getControllers() Return the list of controllers defining this virtual database. | int | getCurrentNbOfThreads() Returns the currentNbOfThreads. | String | getDumpFormatForBackuper(String backuperName) | TabularData | getDumps() | String | getOwningController() | String | getVirtualDatabaseName() | String | getXml() | boolean | hasRecoveryLog() | boolean | hasResultCache() | void | initializeFromBackend(String databaseBackendName, boolean force) Initializes a virtual database from specified Backend. | void | initializeFromBackend(String databaseBackendName) Performs initializeFromBackend(databaseBackendName, force=false). | boolean | isDistributed() | void | replicateBackend(String backendName, String newBackendName, Map parameters) Add an additionnal backend to the virtual database with connection managers
identical to the backend replicated. | void | restoreDumpOnBackend(String databaseBackendName, String login, String password, String dumpName, ArrayList tables) Restore a dump on a specific backend. | void | setBackendLastKnownCheckpoint(String backendName, 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(String backend, String controllerDestination) Transfer the backend to the destinated controller. | void | transferDump(String dumpName, String remoteControllerName, boolean noCopy) Transfer specified dump over to specified vdb's controller, making it
available for restore operation. | void | updateDumpPath(String dumpName, String newPath) Update the path of the dump for a given dumpName. |
abort | void abort(long transactionId, boolean logAbort, boolean forceAbort) throws SQLException(Code) | | 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 Parameters: logAbort - true if the abort (in fact rollback) should be logged inthe recovery log Parameters: forceAbort - true if the abort will be forced. Actually, abort will donothing when a transaction has savepoints (we do not abort thewhole transaction, so that the user can rollback to a previoussavepoint), except when the connection is closed. In this lastcase, if the transaction is not aborted, it prevents futuremaintenance operations such as shutdowns, enable/disable fromcompleting, so we have to force this abort operation. It alsoapplies to the DeadlockDetectionThread and the cleanup of theVirtualDatabaseWorkerThread. throws: SQLException - if an error occurs |
backupBackend | void backupBackend(String backendName, String login, String password, String dumpName, String backuperName, String path, boolean force, ArrayList tables) throws VirtualDatabaseException(Code) | | Create a backup of a specific backend. Note the backend will be disabled if
needed during backup, and will be put back to its previous state after
backup. If there is only one backend left in the system, this operation
will fail when using 'false' as force parameter.
Parameters: backendName - the target backend to backup Parameters: login - the login to use to connect to the database for the backupoperation Parameters: password - the password to use to connect to the database for thebackup operation Parameters: dumpName - the name of the dump to create Parameters: backuperName - the logical name of the backuper to use Parameters: path - the path where to store the dump Parameters: force - use true to force the backup even if there is only one backendleft in the system. Parameters: tables - the list of tables to backup, null means all tables throws: VirtualDatabaseException - if the backup fails |
backupBackend | void backupBackend(String backendName, String login, String password, String dumpName, String backuperName, String path, ArrayList tables) throws VirtualDatabaseException(Code) | | This is backupBackend(force=true).
See Also: backupBackend(String backendName, String login, String password, See Also: String dumpName, String backuperName, String path, boolean force, See Also: ArrayList tables). |
checkAdminAuthentication | boolean checkAdminAuthentication(String adminLogin, String adminPassword) throws VirtualDatabaseException(Code) | | Authenticate a user for a given virtual database
Parameters: adminLogin - username Parameters: adminPassword - password true if authentication is a success, false otherwise throws: VirtualDatabaseException - if database does not exists |
closePersistentConnection | void closePersistentConnection(String login, long persistentConnectionId)(Code) | | Close the given persistent connection.
Parameters: login - login to use to retrieve the right connection pool Parameters: persistentConnectionId - id of the persistent connection to close |
copyLogFromCheckpoint | void copyLogFromCheckpoint(String dumpName, String controllerName) throws VirtualDatabaseException(Code) | | Copies a chunk of the local virtual database recovery log onto a remote
controller's peer virtual database log. The copy is performed from the
checkpoint associated to the specified dump uptil 'now' (a new global
checkpoint). The copy is sent to the specified remote node.
Parameters: dumpName - the name of the dump (which gives associated checkpoint)from which to perform the copy. Parameters: controllerName - the remote controller to send the copy to throws: VirtualDatabaseException - if there is no recovery log, or thevirtual database is not distributed, or in case of error. |
deleteDump | void deleteDump(String dumpName, boolean keepsFile) throws VirtualDatabaseException(Code) | | Delete the dump entry associated to the dumpName .
If keepsFile is false, the dump file is also removed from
the file system.
Parameters: dumpName - name of the dump entry to remove Parameters: keepsFile - true if the dump should be also removedfrom the file system, false else throws: VirtualDatabaseException - if an exception occured while removing thedump entry or the dump file |
deleteLogUpToCheckpoint | void deleteLogUpToCheckpoint(String checkpointName) throws VirtualDatabaseException(Code) | | Deletes the recovery log (if any) from the begining upto the specified
checkpoint.
Parameters: checkpointName - the name of the checkpoint upto which to delete therecovery log. throws: VirtualDatabaseException - if there is no recovery log, or in case oferror. |
disableBackendWithCheckpoint | void disableBackendWithCheckpoint(String databaseBackendName) throws VirtualDatabaseException(Code) | | 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. Disabling a disabled backend is a no-operation.
Parameters: databaseBackendName - The database backend logical name to disable exception: VirtualDatabaseException - in case of communication-related error |
enableBackendFromCheckpoint | void enableBackendFromCheckpoint(String backendName) throws VirtualDatabaseException(Code) | | Enable the given backend from its last known checkpoint
Parameters: backendName - the name of the backend to enable throws: VirtualDatabaseException - if enable failed, or if there is no lastknown checkpoint |
forceDisableBackend | void forceDisableBackend(String databaseBackendName) throws VirtualDatabaseException(Code) | | Disables a backend that is currently enabled on this virtual database
(without further check).
Parameters: databaseBackendName - The database backend logical name to enable exception: VirtualDatabaseException - in case of communication-related error |
forceEnableBackend | void forceEnableBackend(String databaseBackendName) throws VirtualDatabaseException(Code) | | 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 exception: VirtualDatabaseException - in case of communication-related error |
getAvailableDumps | DumpInfo[] getAvailableDumps() throws VirtualDatabaseException(Code) | | Get all available dump info for this virtual database
an array of DumpInfo containing the available dumpinfo for this virtual database. Cannot be null but can be empty. exception: VirtualDatabaseException - if we can't retrieve dumps |
getBackendSchema | String getBackendSchema(String backendName) throws VirtualDatabaseException(Code) | | 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 an xml formatted string throws: VirtualDatabaseException - if an error occurs while accessing thebackend, or if the backend does not exist. |
getBackendStatistics | BackendStatistics getBackendStatistics(String backendName) throws Exception(Code) | | Retrieves an array of statistics of the given backend for this virtual
database
Parameters: backendName - name of the backend BackendStatistics[] of formatted data for allbackends or null if the backend does not exist throws: Exception - if fails |
getBackuperNames | String[] getBackuperNames()(Code) | | Get the names of the Backupers available from this
BackupManager .
an (possibly 0-sized) array of String representingthe name of the Backupers |
getControllers | String[] getControllers()(Code) | | Return the list of controllers defining this virtual database. If the
database is not distributed this returns the same as
getOwningController otherwise returns an array of
controller configuring this DistributedVirtualDatabase
String[] of controller names. |
getCurrentNbOfThreads | int getCurrentNbOfThreads()(Code) | | Returns the currentNbOfThreads.
int |
getDumpFormatForBackuper | String getDumpFormatForBackuper(String backuperName)(Code) | | Get the dump format associated to a given Backuper
Parameters: backuperName - name associated to a Backuper the dump format associated to a given Backuper |
getDumps | TabularData getDumps() throws Exception(Code) | | Get all available dump info for this virtual database
an open-type represenation of the array of DumpInfo that would be returned by #getAvailableDumps() above. exception: VirtualDatabaseException - if we can't retrieve dumps |
getOwningController | String getOwningController()(Code) | | Name of the controller owning this virtual database
url of the controller |
getVirtualDatabaseName | String getVirtualDatabaseName()(Code) | | Gets the virtual database name to be used by the client (Sequoia driver)
the virtual database name |
getXml | String getXml()(Code) | | Retrieves this VirtualDatabase object in xml format
xml formatted string that conforms to sequoia.dtd |
hasRecoveryLog | boolean hasRecoveryLog()(Code) | | Indicate if there is a recovery log defined for this virtual database
true if the recovery log is defined and can beaccessed, false otherwise |
hasResultCache | boolean hasResultCache()(Code) | | Indicate if there is a result cache defined for this virtual database
true if a request cache is defined and can beaccessed, false otherwise |
initializeFromBackend | void initializeFromBackend(String databaseBackendName, boolean force) throws VirtualDatabaseException(Code) | | Initializes a virtual database from specified Backend. This has to be
performed prior to any use of the vdb backends, i.e. there are no active
backends in the vdb, and none has a last known checkpoint. This should be
immediately followed by a backup operation on the specified backend. This
resets the recovery log - if any - to an empty state, i.e. drops logtable,
drops checkpoint table, and clears checkpoint names in the dump table.
Finally, sets the last known checkpoint of specified backend to
Initial_empty_recovery_log.
Parameters: databaseBackendName - the name of the backend to use forinitialization. Parameters: force - if true, do not perform sanity checks, unconditionally performthe initialization throws: VirtualDatabaseException - if there is an active backend or a backendwhich has a last known checkpoint, or if there is no recovery logfor this vdb. |
initializeFromBackend | void initializeFromBackend(String databaseBackendName) throws VirtualDatabaseException(Code) | | Performs initializeFromBackend(databaseBackendName, force=false). This is a
convenience method for backward compatibility.
Parameters: databaseBackendName - the name of the backend to use forinitialization. throws: VirtualDatabaseException - if there is an active backend or a backendwhich has a last known checkpoint, or if there is no recovery logfor this vdb. |
isDistributed | boolean isDistributed()(Code) | | Tells whether this database is distributed or not
true if the database is distributed among multiplecontrollers false if it exists on a singlecontroller only |
replicateBackend | void replicateBackend(String backendName, String newBackendName, Map parameters) throws VirtualDatabaseException(Code) | | 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. Parameters: newBackendName - the new backend name. Parameters: parameters - parameters to override or modify when replicating to thenew backend throws: VirtualDatabaseException - if cannot replicate backend |
restoreDumpOnBackend | void restoreDumpOnBackend(String databaseBackendName, String login, String password, String dumpName, ArrayList tables) throws VirtualDatabaseException(Code) | | Restore a dump on a specific backend. The proper Backuper is retrieved
automatically according to the dump format stored in the recovery log dump
table.
This method 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 Parameters: login - the login to use to connect to the database for the restoreoperation Parameters: password - the password to use to connect to the database for therestore operation Parameters: dumpName - the name of the dump to restore Parameters: tables - the list of tables to restore, null means all tables throws: VirtualDatabaseException - if the restore operation failed |
setBackendLastKnownCheckpoint | void setBackendLastKnownCheckpoint(String backendName, String checkpoint) throws VirtualDatabaseException(Code) | | Sets the last known checkpoint of a backend. This will also update the
value in the recovery log
Parameters: backendName - backend Parameters: checkpoint - checkpoint throws: VirtualDatabaseException - if fails |
setMonitoringToActive | void setMonitoringToActive(boolean active) throws VirtualDatabaseException(Code) | | 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 throws: VirtualDatabaseException - if there is no monitor. |
shutdown | void shutdown(int level) throws VirtualDatabaseException(Code) | | Shutdown this virtual database. Finish all threads and stop connection to
backends
Parameters: level - Constants.SHUTDOWN_WAIT, Constants.SHUTDOWN_SAFE orConstants.SHUTDOWN_FORCE throws: VirtualDatabaseException - if an error occurs |
transferBackend | void transferBackend(String backend, String controllerDestination) throws VirtualDatabaseException(Code) | | Transfer the backend to the destinated controller. Note that this does
nothing in a non-distributed environment
Parameters: backend - the backend to transfer Parameters: controllerDestination - the controller to copy the backend to throws: VirtualDatabaseException - if transfer failed |
transferDump | void transferDump(String dumpName, String remoteControllerName, boolean noCopy) throws VirtualDatabaseException(Code) | | Transfer specified dump over to specified vdb's controller, making it
available for restore operation. The local dump is not deleted and still
available for local restore operations. This operation wants a recovery log
to be enabled for the vdb (stores dump info, and meaning less otherwize as
no restore is possible without a recovery log). It is pointless (and an
error) to use this on a non-distributed virtual db.
Parameters: dumpName - the name of the dump to copy. Should exist locally, and notremotely. Parameters: remoteControllerName - the remote controller to talk to. Parameters: noCopy - specifies whether or not to actually copy the dump. Default:false. No-copy is a useful option in case of NFS/shared dumps. throws: VirtualDatabaseException - in case of error |
|
|