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
  • 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:
      afterStep in interface org.springframework.batch.core.StepExecutionListener
      Overrides:
      afterStep in class StepExecutionSupport
    • beforeStep

      public void beforeStep(org.springframework.batch.core.StepExecution stepExecution)
      Specified by:
      beforeStep in interface org.springframework.batch.core.StepExecutionListener
      Overrides:
      beforeStep in class StepExecutionSupport
    • beforeWrite

      public void beforeWrite(List<? extends File> items)
      Specified by:
      beforeWrite in interface org.springframework.batch.core.ItemWriteListener<File>
    • write

      public void write(List<? extends File> items) throws Exception
      Specified by:
      write in interface org.springframework.batch.item.ItemWriter<File>
      Throws:
      Exception
    • afterWrite

      public void afterWrite(List<? extends File> items)
      Specified by:
      afterWrite in interface org.springframework.batch.core.ItemWriteListener<File>
    • onWriteError

      public void onWriteError(Exception ex, List<? extends File> items)
      Specified by:
      onWriteError in interface org.springframework.batch.core.ItemWriteListener<File>