|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.cjdbc.controller.backup.BackupManager
This class defines a BackupManager
Field Summary | |
private java.lang.String |
backupDir
|
private boolean |
cleanBackupFiles
|
(package private) static Trace |
logger
|
private int |
numberOfBackups
|
private java.util.Hashtable |
threads
|
private boolean |
zipBackupFiles
|
Fields inherited from interface org.objectweb.cjdbc.common.xml.XmlComponent |
DOCTYPE_DB, XML_VERSION |
Constructor Summary | |
BackupManager()
Creates a new BackupManager object |
|
BackupManager(java.lang.String backupDir,
boolean cleanBackupFiles,
boolean zipBackupFiles,
int numberOfBackups)
Creates a new BackupManager object |
Method Summary | |
void |
backup(DatabaseBackend backend,
java.lang.String checkpoint,
java.util.ArrayList tables,
BackupListener listener)
Create a backup from the content of a backend |
java.lang.String |
getBackupDir()
Returns the backupDir value. |
int |
getNumberOfBackups()
Returns the numberOfBackups value. |
void |
getResult(DatabaseBackend backend,
long waitTime)
Get the result of the backup/recovery process for the given backend |
java.lang.String |
getXml()
Get xml formatted representation of this cjdbc component |
boolean |
isCleanBackupFiles()
Returns the cleanBackupFiles value. |
boolean |
isZipBackupFiles()
Returns the zipBackupFiles value. |
java.io.File[] |
listAvailableDumpFiles()
List all the files this backup manager has access to. |
void |
restore(DatabaseBackend backend,
java.lang.String checkpoint,
java.util.ArrayList tables,
BackupListener listener)
Restore the content of a backup onto a specific backend |
void |
setBackupDir(java.lang.String backupDir)
Sets the backupDir value. |
void |
setCleanBackupFiles(boolean cleanBackupFiles)
Sets the cleanBackupFiles value. |
void |
setNumberOfBackups(int numberOfBackups)
Sets the numberOfBackups value. |
void |
setZipBackupFiles(boolean zipBackupFiles)
Sets the zipBackupFiles value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static Trace logger
private java.lang.String backupDir
private boolean cleanBackupFiles
private boolean zipBackupFiles
private int numberOfBackups
private java.util.Hashtable threads
Constructor Detail |
public BackupManager(java.lang.String backupDir, boolean cleanBackupFiles, boolean zipBackupFiles, int numberOfBackups)
BackupManager
object
backupDir
- the directory used for backupcleanBackupFiles
- should we clean temp backup fileszipBackupFiles
- should we zip backup filesnumberOfBackups
- number of backups before deleting others, not usedpublic BackupManager()
BackupManager
object
Method Detail |
public void backup(DatabaseBackend backend, java.lang.String checkpoint, java.util.ArrayList tables, BackupListener listener) throws BackupException
backend
- the target backend to backup fromcheckpoint
- the checkpoint name of the backup to createtables
- the list of tables to consider for backuplistener
- handback object to notify
BackupException
- if backup fails for unknown reasonspublic void getResult(DatabaseBackend backend, long waitTime) throws BackupException, OctopusException
backend
- the backend we started a backup recovery process onwaitTime
- the time to wait to join the octopus thread
BackupException
- if backup fails for unknown reasons
OctopusException
- if backup fails because of Octopuspublic void restore(DatabaseBackend backend, java.lang.String checkpoint, java.util.ArrayList tables, BackupListener listener) throws BackupException
backend
- the target backend to restore tocheckpoint
- the checkpoint name of the backup to restoretables
- the list of tables to consider for restorelistener
- handback object to notify
BackupException
- if backup fails for unknown reasonspublic java.io.File[] listAvailableDumpFiles()
File[]
object that can be empty, but cannot be
nullpublic java.lang.String getBackupDir()
public void setBackupDir(java.lang.String backupDir)
backupDir
- The backupDir to set.public boolean isCleanBackupFiles()
public void setCleanBackupFiles(boolean cleanBackupFiles)
cleanBackupFiles
- The cleanBackupFiles to set.public int getNumberOfBackups()
public void setNumberOfBackups(int numberOfBackups)
numberOfBackups
- The numberOfBackups to set.public boolean isZipBackupFiles()
public void setZipBackupFiles(boolean zipBackupFiles)
zipBackupFiles
- The zipBackupFiles to set.public java.lang.String getXml()
XmlComponent
getXml
in interface XmlComponent
XmlComponent.getXml()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |