Class SyncWriter
java.lang.Object
org.duracloud.snapshot.service.impl.StepExecutionSupport
org.duracloud.snapshot.service.impl.SyncWriter
- All Implemented Interfaces:
org.springframework.batch.core.ItemWriteListener<File>,org.springframework.batch.core.StepExecutionListener,org.springframework.batch.core.StepListener,org.springframework.batch.item.ItemWriter<File>
public class SyncWriter
extends StepExecutionSupport
implements org.springframework.batch.item.ItemWriter<File>, org.springframework.batch.core.ItemWriteListener<File>
This class is responsible for syncing content from the bridge to DuraCloud.
- Author:
- Daniel Bernstein Date: Jul 17, 2014
-
Field Summary
Fields inherited from class org.duracloud.snapshot.service.impl.StepExecutionSupport
ERRORS_KEY, ITEMS_READ_KEY -
Constructor Summary
ConstructorsConstructorDescriptionSyncWriter(String restorationId, File watchDir, org.duracloud.sync.endpoint.SyncEndpoint endpoint, org.duracloud.client.ContentStore contentStore, String destinationSpaceId, RestoreManager restoreManager) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.batch.core.ExitStatusafterStep(org.springframework.batch.core.StepExecution stepExecution) voidafterWrite(List<? extends File> items) voidbeforeStep(org.springframework.batch.core.StepExecution stepExecution) voidbeforeWrite(List<? extends File> items) voidonWriteError(Exception ex, List<? extends File> items) voidMethods inherited from class org.duracloud.snapshot.service.impl.StepExecutionSupport
addError, addToItemsRead, addToLong, clearErrors, failExecution, getErrors, getExecutionContext, getItemsRead, getLongValue, getStepExecution, resetContextState, setIsTest, skipLinesAlreadyRead, verifySpace
-
Constructor Details
-
SyncWriter
public SyncWriter(String restorationId, File watchDir, org.duracloud.sync.endpoint.SyncEndpoint endpoint, org.duracloud.client.ContentStore contentStore, String destinationSpaceId, RestoreManager restoreManager) - Parameters:
restorationId-watchDir-endpoint-contentStore-destinationSpaceId-restoreManager-
-
-
Method Details
-
afterStep
public org.springframework.batch.core.ExitStatus afterStep(org.springframework.batch.core.StepExecution stepExecution) - Specified by:
afterStepin interfaceorg.springframework.batch.core.StepExecutionListener- Overrides:
afterStepin classStepExecutionSupport
-
beforeStep
public void beforeStep(org.springframework.batch.core.StepExecution stepExecution) - Specified by:
beforeStepin interfaceorg.springframework.batch.core.StepExecutionListener- Overrides:
beforeStepin classStepExecutionSupport
-
beforeWrite
- Specified by:
beforeWritein interfaceorg.springframework.batch.core.ItemWriteListener<File>
-
write
-
afterWrite
- Specified by:
afterWritein interfaceorg.springframework.batch.core.ItemWriteListener<File>
-
onWriteError
- Specified by:
onWriteErrorin interfaceorg.springframework.batch.core.ItemWriteListener<File>
-