Package org.duracloud.snapshot.service
Interface SnapshotJobManager
public interface SnapshotJobManager
An interface defining the interaction between the REST
api and job engine. Primary function is to hide the details
of the underlying job processing subsystem.
- Author:
- Daniel Bernstein Date: Feb 11, 2014
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelRestore(String restoreId) Stops the restore process and removes source content and destination space.voidcancelSnapshot(String snapshotId) Cancels a snapshotorg.springframework.batch.core.BatchStatusexecuteRestoration(String restorationId) org.springframework.batch.core.BatchStatusexecuteSnapshot(String snapshotId) This method creates an underlying job and executes it.Access the snapshot job manager configuration.org.springframework.batch.core.BatchStatusvoidinit(SnapshotJobManagerConfig duracloudCredential) Lazily initializes the component.booleanstopRestore(String restoreId) Stops the restore process but leaves underlying file system and destination space intact.
-
Field Details
-
JOB_REPOSITORY_KEY
- See Also:
-
JOB_LAUNCHER_KEY
- See Also:
-
-
Method Details
-
init
Lazily initializes the component. The data source must be fully configured when this method is called; otherwise it will fail.- Parameters:
duracloudCredential-- Throws:
AlreadyInitializedException- if the service is already initialized.
-
isInitialized
boolean isInitialized()- Returns:
- true if the service is already initialized.
-
executeSnapshot
org.springframework.batch.core.BatchStatus executeSnapshot(String snapshotId) throws SnapshotException This method creates an underlying job and executes it.- Parameters:
snapshotId-- Returns:
- Throws:
SnapshotException
-
getStatus
org.springframework.batch.core.BatchStatus getStatus(String snapshotId) throws SnapshotNotFoundException, SnapshotException - Parameters:
snapshotId-- Returns:
- Throws:
SnapshotNotFoundExceptionSnapshotException
-
executeRestoration
org.springframework.batch.core.BatchStatus executeRestoration(String restorationId) throws SnapshotException - Parameters:
restorationId-- Returns:
- Throws:
SnapshotException
-
cancelSnapshot
Cancels a snapshot- Parameters:
snapshotId-- Throws:
SnapshotException
-
cancelRestore
Stops the restore process and removes source content and destination space. Cancels a restore- Parameters:
restoreId-- Throws:
SnapshotException
-
stopRestore
Stops the restore process but leaves underlying file system and destination space intact.- Parameters:
restoreId-- Returns:
- Throws:
SnapshotException
-
getConfig
SnapshotJobManagerConfig getConfig()Access the snapshot job manager configuration.- Returns:
- the config object
-