Class SnapshotJobManagerImpl
java.lang.Object
org.duracloud.snapshot.service.impl.SnapshotJobManagerImpl
- All Implemented Interfaces:
SnapshotJobManager
The default implementation of the
SnapshotJobManager interface.
Uses spring-batch componentry.- Author:
- Daniel Bernstein Date: Feb 11, 2014
-
Field Summary
Fields inherited from interface org.duracloud.snapshot.service.SnapshotJobManager
JOB_LAUNCHER_KEY, JOB_REPOSITORY_KEY -
Constructor Summary
ConstructorsConstructorDescriptionSnapshotJobManagerImpl(SnapshotRepo snapshotRepo, RestoreRepo restoreRepo, org.springframework.batch.core.launch.JobLauncher jobLauncher, org.springframework.batch.core.repository.JobRepository jobRepository, BatchJobBuilderManager manager, StoreClientHelper storeClientHelper, EventLog eventLog) -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelRestore(String restoreId) voidcancelSnapshot(String snapshotId) org.springframework.batch.core.BatchStatusexecuteRestoration(String restorationId) org.springframework.batch.core.BatchStatusexecuteSnapshot(String snapshotId) org.springframework.batch.core.BatchStatusvoidinit(SnapshotJobManagerConfig config) protected voidinit(SnapshotJobManagerConfig config, boolean attemptRestart) booleanstopRestore(String restoreId)
-
Constructor Details
-
SnapshotJobManagerImpl
@Autowired public SnapshotJobManagerImpl(SnapshotRepo snapshotRepo, RestoreRepo restoreRepo, org.springframework.batch.core.launch.JobLauncher jobLauncher, org.springframework.batch.core.repository.JobRepository jobRepository, BatchJobBuilderManager manager, StoreClientHelper storeClientHelper, EventLog eventLog)
-
-
Method Details
-
init
- Specified by:
initin interfaceSnapshotJobManager- Throws:
AlreadyInitializedException
-
init
protected void init(SnapshotJobManagerConfig config, boolean attemptRestart) throws AlreadyInitializedException - Throws:
AlreadyInitializedException
-
isInitialized
public boolean isInitialized()- Specified by:
isInitializedin interfaceSnapshotJobManager
-
executeRestoration
public org.springframework.batch.core.BatchStatus executeRestoration(String restorationId) throws SnapshotException - Specified by:
executeRestorationin interfaceSnapshotJobManager- Throws:
SnapshotException
-
executeSnapshot
public org.springframework.batch.core.BatchStatus executeSnapshot(String snapshotId) throws SnapshotException - Specified by:
executeSnapshotin interfaceSnapshotJobManager- Throws:
SnapshotException
-
cancelSnapshot
- Specified by:
cancelSnapshotin interfaceSnapshotJobManager- Throws:
SnapshotException
-
stopRestore
- Specified by:
stopRestorein interfaceSnapshotJobManager- Throws:
SnapshotException
-
cancelRestore
- Specified by:
cancelRestorein interfaceSnapshotJobManager- Throws:
SnapshotException
-
getStatus
public org.springframework.batch.core.BatchStatus getStatus(String snapshotId) throws SnapshotNotFoundException, SnapshotException - Specified by:
getStatusin interfaceSnapshotJobManager- Throws:
SnapshotNotFoundExceptionSnapshotException
-
getConfig
- Specified by:
getConfigin interfaceSnapshotJobManager
-