Package org.duracloud.snapshot.service
Interface SnapshotJobManager
-
public interface SnapshotJobManagerAn 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 Modifier and Type Field Description static StringJOB_LAUNCHER_KEYstatic StringJOB_REPOSITORY_KEY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcancelRestore(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.SnapshotJobManagerConfiggetConfig()Access the snapshot job manager configuration.org.springframework.batch.core.BatchStatusgetStatus(String snapshotId)voidinit(SnapshotJobManagerConfig duracloudCredential)Lazily initializes the component.booleanisInitialized()RestorationstopRestore(String restoreId)Stops the restore process but leaves underlying file system and destination space intact.
-
-
-
Field Detail
-
JOB_REPOSITORY_KEY
static final String JOB_REPOSITORY_KEY
- See Also:
- Constant Field Values
-
JOB_LAUNCHER_KEY
static final String JOB_LAUNCHER_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
void init(SnapshotJobManagerConfig duracloudCredential) throws AlreadyInitializedException
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
void cancelSnapshot(String snapshotId) throws SnapshotException
Cancels a snapshot- Parameters:
snapshotId-- Throws:
SnapshotException
-
cancelRestore
void cancelRestore(String restoreId) throws SnapshotException
Stops the restore process and removes source content and destination space. Cancels a restore- Parameters:
restoreId-- Throws:
SnapshotException
-
stopRestore
Restoration stopRestore(String restoreId) throws SnapshotException
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
-
-