org.duracloud.sync.backup
Class ChangedListBackupManager
java.lang.Object
org.duracloud.sync.backup.ChangedListBackupManager
- All Implemented Interfaces:
- Runnable
public class ChangedListBackupManager
- extends Object
- implements Runnable
Manages the backing up of the changed list on a consistent schedule.
Method Summary |
void |
endBackup()
|
long |
loadBackup()
Attempts to reload the changed list from a backup file. |
void |
run()
Runs the backup manager. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SAVED_BACKUPS
public static final int SAVED_BACKUPS
- See Also:
- Constant Field Values
ChangedListBackupManager
public ChangedListBackupManager(ChangedList changedList,
File backupDir,
long backupFrequency)
loadBackup
public long loadBackup()
- Attempts to reload the changed list from a backup file. If there are
no backup files or the backup file cannot be read, returns -1, otherwise
the backup file is loaded and the time the backup file was written is
returned.
- Returns:
- the write time of the backup file, or -1 if no backup is available
run
public void run()
- Runs the backup manager. Writes out files which are a backups of the
changed list based on the set backup frequency. Retains SAVED_BACKUPS
number of backup files, removes the rest.
- Specified by:
run
in interface Runnable
endBackup
public void endBackup()
Copyright © 2009-2011 DuraSpace. All Rights Reserved.