Class SnapshotJobManagerImpl
- java.lang.Object
-
- org.duracloud.snapshot.service.impl.SnapshotJobManagerImpl
-
- All Implemented Interfaces:
SnapshotJobManager
@Component public class SnapshotJobManagerImpl extends java.lang.Object implements SnapshotJobManager
The default implementation of theSnapshotJobManagerinterface. 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
Constructors Constructor Description 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelRestore(java.lang.String restoreId)voidcancelSnapshot(java.lang.String snapshotId)org.springframework.batch.core.BatchStatusexecuteRestoration(java.lang.String restorationId)org.springframework.batch.core.BatchStatusexecuteSnapshot(java.lang.String snapshotId)SnapshotJobManagerConfiggetConfig()org.springframework.batch.core.BatchStatusgetStatus(java.lang.String snapshotId)voidinit(SnapshotJobManagerConfig config)protected voidinit(SnapshotJobManagerConfig config, boolean attemptRestart)booleanisInitialized()RestorationstopRestore(java.lang.String restoreId)
-
-
-
Constructor Detail
-
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 Detail
-
init
public void init(SnapshotJobManagerConfig config) throws AlreadyInitializedException
- 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(java.lang.String restorationId) throws SnapshotException- Specified by:
executeRestorationin interfaceSnapshotJobManager- Throws:
SnapshotException
-
executeSnapshot
public org.springframework.batch.core.BatchStatus executeSnapshot(java.lang.String snapshotId) throws SnapshotException- Specified by:
executeSnapshotin interfaceSnapshotJobManager- Throws:
SnapshotException
-
cancelSnapshot
@Transactional public void cancelSnapshot(java.lang.String snapshotId) throws SnapshotException- Specified by:
cancelSnapshotin interfaceSnapshotJobManager- Throws:
SnapshotException
-
stopRestore
@Transactional public Restoration stopRestore(java.lang.String restoreId) throws SnapshotException
- Specified by:
stopRestorein interfaceSnapshotJobManager- Throws:
SnapshotException
-
cancelRestore
@Transactional public void cancelRestore(java.lang.String restoreId) throws SnapshotException- Specified by:
cancelRestorein interfaceSnapshotJobManager- Throws:
SnapshotException
-
getStatus
public org.springframework.batch.core.BatchStatus getStatus(java.lang.String snapshotId) throws SnapshotNotFoundException, SnapshotException- Specified by:
getStatusin interfaceSnapshotJobManager- Throws:
SnapshotNotFoundExceptionSnapshotException
-
getConfig
public SnapshotJobManagerConfig getConfig()
- Specified by:
getConfigin interfaceSnapshotJobManager
-
-