Package org.duracloud.snapshot.service
Interface RestoreManager
public interface RestoreManager
- Author:
- Daniel Bernstein Date: Jul 15, 2014
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancelRestore(String restoreId) Cancels a restore.voidLook for restorations which have expired, and perform final cleanup actionsgetBySnapshotId(String snapshotId) Retrieves a restoration based on the ID of the snapshot being restoredvoidinit(RestoreManagerConfig config, SnapshotJobManager jobManager) requestRestoreSnapshot(String snapshotId, DuracloudEndPointConfig destination, String userEmail) Sends an email request to duracloud admin to restore a space.restartRestore(String restoreId) Restarts a restore.restoreCompleted(String restorationId) Called by the process responsible for performing the restoration from preservation storage to Bridge Storage upon completion of the transfer.restoreSnapshot(String snapshotId, DuracloudEndPointConfig destination, String userEmail) Initiates the restoration of a snapshot.transitionRestoreStatus(String restorationId, org.duracloud.snapshot.dto.RestoreStatus status, String message) Transition the workflow status of the restore activity to a new status
-
Method Details
-
init
- Parameters:
config-jobManager-
-
restoreSnapshot
Restoration restoreSnapshot(String snapshotId, DuracloudEndPointConfig destination, String userEmail) throws SnapshotNotFoundException, SnapshotInProcessException, SnapshotException Initiates the restoration of a snapshot.- Parameters:
snapshotId-destination-userEmail-- Returns:
- Throws:
SnapshotNotFoundExceptionSnapshotInProcessExceptionSnapshotException
-
requestRestoreSnapshot
Snapshot requestRestoreSnapshot(String snapshotId, DuracloudEndPointConfig destination, String userEmail) throws SnapshotException Sends an email request to duracloud admin to restore a space.- Parameters:
snapshotId-destination- The destination where the restore should occur.userEmail- email to notify when restore starts and ends.- Returns:
- snapshot to be restored
- Throws:
SnapshotNotFoundExceptionSnapshotException
-
restoreCompleted
Restoration restoreCompleted(String restorationId) throws SnapshotNotFoundException, SnapshotInProcessException, NoRestorationInProcessException, SnapshotException Called by the process responsible for performing the restoration from preservation storage to Bridge Storage upon completion of the transfer.- Parameters:
restorationId-- Returns:
- Throws:
SnapshotNotFoundExceptionSnapshotInProcessExceptionNoRestorationInProcessExceptionSnapshotException
-
get
- Parameters:
restorationId-- Returns:
- Throws:
RestorationNotFoundException
-
transitionRestoreStatus
Restoration transitionRestoreStatus(String restorationId, org.duracloud.snapshot.dto.RestoreStatus status, String message) throws InvalidStateTransitionException, RestorationNotFoundException Transition the workflow status of the restore activity to a new status- Parameters:
restorationId-status-message-- Returns:
- Throws:
InvalidStateTransitionExceptionRestorationNotFoundException
-
getBySnapshotId
Retrieves a restoration based on the ID of the snapshot being restored- Parameters:
snapshotId-- Returns:
- Throws:
RestorationNotFoundException
-
finalizeRestores
void finalizeRestores()Look for restorations which have expired, and perform final cleanup actions -
cancelRestore
Cancels a restore.- Parameters:
restoreId-- Throws:
SnapshotException
-
restartRestore
Restarts a restore. Assumes that the transfer from preservation storage was successful.- Parameters:
restoreId-- Throws:
SnapshotException
-