public class RecoveryManager<T extends java.io.Serializable>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
HISTORY_SUBFOLDER |
protected static java.lang.String |
RECOVERY_FOLDER |
protected static java.lang.String |
SUFFIX |
protected static java.lang.String |
SUFFIX_COMPLETE |
protected static java.lang.String |
SUFFIX_PENDING |
Constructor and Description |
---|
RecoveryManager(BlueCollectionOnDisk<T> collection,
FileManager fileManager,
BlueSerializer serializer) |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.io.File> |
getChangeHistory(long backupStartTime,
long backupEndTime) |
ChangeHistoryCleaner |
getChangeHistoryCleaner() |
BlueCollectionOnDisk<T> |
getCollection() |
java.util.List<java.io.File> |
getCompletedChangeFiles() |
static java.lang.String |
getCompletedFileName(Recoverable<?> change) |
java.nio.file.Path |
getHistoryFolder() |
long |
getNewRecoverableId() |
java.util.List<java.io.File> |
getPendingChangeFiles() |
java.util.List<Recoverable<T>> |
getPendingChanges() |
static java.lang.String |
getPendingFileName(Recoverable<?> change) |
void |
markChangePending(java.nio.file.Path completedPath) |
void |
markComplete(Recoverable<?> change) |
void |
placeHoldOnHistoryCleanup() |
void |
recover() |
void |
removeHoldOnHistoryCleanup() |
void |
saveChange(Recoverable<?> change) |
protected static java.lang.String RECOVERY_FOLDER
protected static java.lang.String HISTORY_SUBFOLDER
protected static java.lang.String SUFFIX
protected static java.lang.String SUFFIX_PENDING
protected static java.lang.String SUFFIX_COMPLETE
public RecoveryManager(BlueCollectionOnDisk<T> collection, FileManager fileManager, BlueSerializer serializer)
public void saveChange(Recoverable<?> change) throws BlueDbException
BlueDbException
public java.nio.file.Path getHistoryFolder()
public BlueCollectionOnDisk<T> getCollection()
public void markComplete(Recoverable<?> change) throws BlueDbException
BlueDbException
public void markChangePending(java.nio.file.Path completedPath) throws BlueDbException
BlueDbException
public java.util.List<java.io.File> getChangeHistory(long backupStartTime, long backupEndTime) throws BlueDbException
BlueDbException
public java.util.List<Recoverable<T>> getPendingChanges() throws BlueDbException
BlueDbException
public java.util.List<java.io.File> getCompletedChangeFiles()
public java.util.List<java.io.File> getPendingChangeFiles()
public void recover() throws BlueDbException
BlueDbException
public void placeHoldOnHistoryCleanup()
public void removeHoldOnHistoryCleanup()
public long getNewRecoverableId()
public static java.lang.String getCompletedFileName(Recoverable<?> change)
public static java.lang.String getPendingFileName(Recoverable<?> change)
public ChangeHistoryCleaner getChangeHistoryCleaner()