|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.cjdbc.controller.backup.DerbyEmbeddedBackuper
This class defines a Backuper for Apache Derby databases.
Supported URLs are jdbc:derby:PathToDerbyDatabase[;options]
The Backuper itself does not take any option. It simply dumps the Derby directory into a zip file.
Field Summary | |
(package private) static Trace |
logger
|
Constructor Summary | |
DerbyEmbeddedBackuper()
Creates a new DerbyEmbeddedBackuper object |
Method Summary | |
java.util.Date |
backup(DatabaseBackend backend,
java.lang.String login,
java.lang.String password,
java.lang.String dumpName,
java.lang.String path,
java.util.ArrayList tables)
Create a backup from the content of a backend. |
void |
deleteDump(java.lang.String path,
java.lang.String dumpName)
Delete the specified dump. |
void |
fetchDump(DumpTransferInfo dumpTransferInfo,
java.lang.String path,
java.lang.String dumpName)
Client side: Fetch a remote dump from specified dump server. |
BackupManager |
getBackupManager()
Return the BackupManager this Backuper belongs to. |
private java.lang.String |
getDerbyPath(DatabaseBackend backend,
boolean checkPath)
Extract the path where the Derby database is stored by parsing the backend JDBC URL. |
java.lang.String |
getDumpFormat()
Returns a String representing the format handled by this Backuper. |
private java.lang.String |
getDumpPhysicalPath(java.lang.String path,
java.lang.String dumpName)
Get the dump physical path from its logical name |
java.lang.String |
getOptions()
Retrieve the backuper options that were used to initialize the backuper. |
void |
restore(DatabaseBackend backend,
java.lang.String login,
java.lang.String password,
java.lang.String dumpName,
java.lang.String path,
java.util.ArrayList tables)
Restore a dump on a specific backend. |
void |
setOptions(java.lang.String options)
Options that can be set at backuper initialization. |
DumpTransferInfo |
setupServer()
Server side: setup a server and returns a DumpTransferInfo suitable for authenticated communication by a client using fetchDump(). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static Trace logger
Constructor Detail |
public DerbyEmbeddedBackuper()
DerbyEmbeddedBackuper
object
Method Detail |
public java.lang.String getDumpFormat()
Backuper
getDumpFormat
in interface Backuper
Backuper.getDumpFormat()
public java.lang.String getOptions()
Backuper
getOptions
in interface Backuper
Backuper.getOptions()
public void setOptions(java.lang.String options)
Backuper
setOptions
in interface Backuper
options
- Backuper specific optionsBackuper.setOptions(java.lang.String)
public java.util.Date backup(DatabaseBackend backend, java.lang.String login, java.lang.String password, java.lang.String dumpName, java.lang.String path, java.util.ArrayList tables) throws BackupException
Backuper
backup
in interface Backuper
backend
- 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 createpath
- the path where to store the dumptables
- the list of tables to backup, null means all tables
BackupException
- if the backup operation failsBackuper.backup(org.objectweb.cjdbc.controller.backend.DatabaseBackend,
java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.util.ArrayList)
public void restore(DatabaseBackend backend, java.lang.String login, java.lang.String password, java.lang.String dumpName, java.lang.String path, java.util.ArrayList tables) throws BackupException
Backuper
restore
in interface Backuper
backend
- the target backend to restore tologin
- 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 restorepath
- the path where to retrieve the dumptables
- the list of tables to restore, null means all tables
BackupException
- if the restore operation failedBackuper.restore(org.objectweb.cjdbc.controller.backend.DatabaseBackend,
java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.util.ArrayList)
public void deleteDump(java.lang.String path, java.lang.String dumpName) throws BackupException
Backuper
deleteDump
in interface Backuper
path
- the path where to retrieve the dumpdumpName
- the dump to delete
BackupException
- if we failed to delete the dumpBackuper.deleteDump(java.lang.String,
java.lang.String)
private java.lang.String getDumpPhysicalPath(java.lang.String path, java.lang.String dumpName)
path
- the path where the dump is storeddumpName
- dump logical name
private java.lang.String getDerbyPath(DatabaseBackend backend, boolean checkPath) throws BackupException
backend
- the Derby backendcheckPath
- if true we check if the path is a valid directory
BackupException
- if the URL is not valid or the path not validpublic void fetchDump(DumpTransferInfo dumpTransferInfo, java.lang.String path, java.lang.String dumpName) throws BackupException
Backuper
fetchDump
in interface Backuper
dumpTransferInfo
- the address and session key of the dump server to
contact for fetching.path
- the path part of the remote dump spec (interpreted by server)dumpName
- the name part of the remote dump spec (interpreted by
server)
BackupException
- in any error case: authentication error, transfer
error, else.Backuper.fetchDump(org.objectweb.cjdbc.controller.backup.DumpTransferInfo,
java.lang.String, java.lang.String)
public DumpTransferInfo setupServer()
Backuper
setupServer
in interface Backuper
Backuper.setupServer()
public BackupManager getBackupManager()
Backuper
getBackupManager
in interface Backuper
Backuper.getBackupManager()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |