|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.marringtons.object.Backup
The database system needs procedures for backing up and restoring all changes. This class includes the relevant methods - and a daemon to do it at specific time. All methods are static, but Database refers to it to initialise the backup daemon. All backups are part of the idle process to minimise the effect on the running system. It is controlled by 2 properties in any previously loaded property file.
Backup.backupAll(); // backs up all open databases ZipOutputStream zip = new ZipOutputStream( Output.makeUnique( "testBackup", "zip"), false); Backup.backupAll( zip); // backs up all open databases to an archive Backup.restoreAll( archiveName);The backup daemon is started when this class is first accessed (by Database).
| Method Summary | |
static String[] |
backupAll()
Back up all active databases to a unique to unique XML files of the same names in the default output directory. |
static String[] |
backupAll(ZipOutputStream zip)
Back up all active databases to the supplied archive. |
static void |
restoreAll(String archiveName)
Restore all databases from an archive. |
void |
whileIdling()
The database is backed up regularly as part of the idle process. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static String[] backupAll()
throws IllegalArgumentException,
IOException,
IllegalAccessException,
InstantiationException
InstantiationException
IllegalAccessException
IOException
IllegalArgumentException
public static String[] backupAll(ZipOutputStream zip)
throws IllegalArgumentException,
IOException,
IllegalAccessException,
InstantiationException
zip - Archive to hold backup.
InstantiationException
IllegalAccessException
IOException
IllegalArgumentException
public static void restoreAll(String archiveName)
throws XMLexception,
IOException
archiveName - name of a zip archive containing XML backup files
IOException
XMLexceptionpublic void whileIdling()
whileIdling in interface IdleInterfaceIdleInterface.whileIdling()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||