- 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
Constructors Constructor Description SyncWriter(String restorationId, File watchDir, org.duracloud.sync.endpoint.SyncEndpoint endpoint, org.duracloud.client.ContentStore contentStore, String destinationSpaceId, org.duracloud.snapshot.service.RestoreManager restoreManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.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)voidwrite(List<? extends File> items)-
Methods inherited from class org.duracloud.snapshot.service.impl.StepExecutionSupport
addError, addToItemsRead, addToLong, clearErrors, failExecution, getErrors, getExecutionContext, getItemsRead, getLongValue, getStepExecution, resetContextState, setIsTest, skipLinesAlreadyRead, verifySpace
-
-
-
-
Constructor Detail
-
SyncWriter
public SyncWriter(String restorationId, File watchDir, org.duracloud.sync.endpoint.SyncEndpoint endpoint, org.duracloud.client.ContentStore contentStore, String destinationSpaceId, org.duracloud.snapshot.service.RestoreManager restoreManager)
- Parameters:
restorationId-watchDir-endpoint-contentStore-destinationSpaceId-restoreManager-
-
-
Method Detail
-
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
public void beforeWrite(List<? extends File> items)
- Specified by:
beforeWritein interfaceorg.springframework.batch.core.ItemWriteListener<File>
-
afterWrite
public void afterWrite(List<? extends File> items)
- Specified by:
afterWritein interfaceorg.springframework.batch.core.ItemWriteListener<File>
-
-