Package org.duracloud.snapshot.service
Interface RestoreManager
-
public interface RestoreManager- Author:
- Daniel Bernstein Date: Jul 15, 2014
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcancelRestore(String restoreId)Cancels a restore.voidfinalizeRestores()Look for restorations which have expired, and perform final cleanup actionsRestorationget(String restorationId)RestorationgetBySnapshotId(String snapshotId)Retrieves a restoration based on the ID of the snapshot being restoredvoidinit(RestoreManagerConfig config, SnapshotJobManager jobManager)SnapshotrequestRestoreSnapshot(String snapshotId, DuracloudEndPointConfig destination, String userEmail)Sends an email request to duracloud admin to restore a space.RestorationrestartRestore(String restoreId)Restarts a restore.RestorationrestoreCompleted(String restorationId)Called by the process responsible for performing the restoration from preservation storage to Bridge Storage upon completion of the transfer.RestorationrestoreSnapshot(String snapshotId, DuracloudEndPointConfig destination, String userEmail)Initiates the restoration of a snapshot.RestorationtransitionRestoreStatus(String restorationId, org.duracloud.snapshot.dto.RestoreStatus status, String message)Transition the workflow status of the restore activity to a new status
-
-
-
Method Detail
-
init
void init(RestoreManagerConfig config, SnapshotJobManager jobManager)
- 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
Restoration get(String restorationId) throws RestorationNotFoundException
- 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
Restoration getBySnapshotId(String snapshotId) throws RestorationNotFoundException
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
void cancelRestore(String restoreId) throws SnapshotException
Cancels a restore.- Parameters:
restoreId-- Throws:
SnapshotException
-
restartRestore
Restoration restartRestore(String restoreId) throws SnapshotException
Restarts a restore. Assumes that the transfer from preservation storage was successful.- Parameters:
restoreId-- Throws:
SnapshotException
-
-