- java.lang.Object
-
- org.duracloud.snapshot.service.impl.SnapshotJobManagerImpl
-
- All Implemented Interfaces:
org.duracloud.snapshot.service.SnapshotJobManager
@Component public class SnapshotJobManagerImpl extends Object implements org.duracloud.snapshot.service.SnapshotJobManager
The default implementation of theSnapshotJobManagerinterface. Uses spring-batch componentry.- Author:
- Daniel Bernstein Date: Feb 11, 2014
-
-
Constructor Summary
Constructors Constructor Description SnapshotJobManagerImpl(org.duracloud.snapshot.db.repo.SnapshotRepo snapshotRepo, org.duracloud.snapshot.db.repo.RestoreRepo restoreRepo, org.springframework.batch.core.launch.JobLauncher jobLauncher, org.springframework.batch.core.repository.JobRepository jobRepository, BatchJobBuilderManager manager, StoreClientHelper storeClientHelper, org.duracloud.snapshot.service.EventLog eventLog)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelRestore(String restoreId)voidcancelSnapshot(String snapshotId)org.springframework.batch.core.BatchStatusexecuteRestoration(String restorationId)org.springframework.batch.core.BatchStatusexecuteSnapshot(String snapshotId)org.duracloud.snapshot.service.SnapshotJobManagerConfiggetConfig()org.springframework.batch.core.BatchStatusgetStatus(String snapshotId)voidinit(org.duracloud.snapshot.service.SnapshotJobManagerConfig config)protected voidinit(org.duracloud.snapshot.service.SnapshotJobManagerConfig config, boolean attemptRestart)booleanisInitialized()org.duracloud.snapshot.db.model.RestorationstopRestore(String restoreId)
-
-
-
Constructor Detail
-
SnapshotJobManagerImpl
@Autowired public SnapshotJobManagerImpl(org.duracloud.snapshot.db.repo.SnapshotRepo snapshotRepo, org.duracloud.snapshot.db.repo.RestoreRepo restoreRepo, org.springframework.batch.core.launch.JobLauncher jobLauncher, org.springframework.batch.core.repository.JobRepository jobRepository, BatchJobBuilderManager manager, StoreClientHelper storeClientHelper, org.duracloud.snapshot.service.EventLog eventLog)
-
-
Method Detail
-
init
public void init(org.duracloud.snapshot.service.SnapshotJobManagerConfig config) throws org.duracloud.snapshot.service.AlreadyInitializedException- Specified by:
initin interfaceorg.duracloud.snapshot.service.SnapshotJobManager- Throws:
org.duracloud.snapshot.service.AlreadyInitializedException
-
init
protected void init(org.duracloud.snapshot.service.SnapshotJobManagerConfig config, boolean attemptRestart) throws org.duracloud.snapshot.service.AlreadyInitializedException- Throws:
org.duracloud.snapshot.service.AlreadyInitializedException
-
isInitialized
public boolean isInitialized()
- Specified by:
isInitializedin interfaceorg.duracloud.snapshot.service.SnapshotJobManager
-
executeRestoration
public org.springframework.batch.core.BatchStatus executeRestoration(String restorationId) throws org.duracloud.snapshot.SnapshotException
- Specified by:
executeRestorationin interfaceorg.duracloud.snapshot.service.SnapshotJobManager- Throws:
org.duracloud.snapshot.SnapshotException
-
executeSnapshot
public org.springframework.batch.core.BatchStatus executeSnapshot(String snapshotId) throws org.duracloud.snapshot.SnapshotException
- Specified by:
executeSnapshotin interfaceorg.duracloud.snapshot.service.SnapshotJobManager- Throws:
org.duracloud.snapshot.SnapshotException
-
cancelSnapshot
@Transactional public void cancelSnapshot(String snapshotId) throws org.duracloud.snapshot.SnapshotException
- Specified by:
cancelSnapshotin interfaceorg.duracloud.snapshot.service.SnapshotJobManager- Throws:
org.duracloud.snapshot.SnapshotException
-
stopRestore
@Transactional public org.duracloud.snapshot.db.model.Restoration stopRestore(String restoreId) throws org.duracloud.snapshot.SnapshotException
- Specified by:
stopRestorein interfaceorg.duracloud.snapshot.service.SnapshotJobManager- Throws:
org.duracloud.snapshot.SnapshotException
-
cancelRestore
@Transactional public void cancelRestore(String restoreId) throws org.duracloud.snapshot.SnapshotException
- Specified by:
cancelRestorein interfaceorg.duracloud.snapshot.service.SnapshotJobManager- Throws:
org.duracloud.snapshot.SnapshotException
-
getStatus
public org.springframework.batch.core.BatchStatus getStatus(String snapshotId) throws org.duracloud.snapshot.SnapshotNotFoundException, org.duracloud.snapshot.SnapshotException
- Specified by:
getStatusin interfaceorg.duracloud.snapshot.service.SnapshotJobManager- Throws:
org.duracloud.snapshot.SnapshotNotFoundExceptionorg.duracloud.snapshot.SnapshotException
-
getConfig
public org.duracloud.snapshot.service.SnapshotJobManagerConfig getConfig()
- Specified by:
getConfigin interfaceorg.duracloud.snapshot.service.SnapshotJobManager
-
-