public class SpaceItemWriter extends StepExecutionSupport implements org.springframework.batch.item.ItemWriter<org.duracloud.common.model.ContentItem>, org.springframework.batch.core.ItemWriteListener<org.duracloud.common.model.ContentItem>
ERRORS_KEY, ITEMS_READ_KEY| Constructor and Description |
|---|
SpaceItemWriter(Snapshot snapshot,
org.duracloud.retrieval.source.RetrievalSource retrievalSource,
File contentDir,
org.duracloud.retrieval.mgmt.OutputWriter outputWriter,
File propsFile,
File md5ManifestFile,
File sha256ManifestFile,
SnapshotManager snapshotManager,
SpaceManifestDpnManifestVerifier spaceManifestDpnManifestVerifier) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.batch.core.ExitStatus |
afterStep(org.springframework.batch.core.StepExecution stepExecution) |
void |
afterWrite(List<? extends org.duracloud.common.model.ContentItem> items) |
void |
beforeStep(org.springframework.batch.core.StepExecution stepExecution) |
void |
beforeWrite(List<? extends org.duracloud.common.model.ContentItem> items) |
protected void |
closeDatabase() |
protected void |
deleteDatabase() |
protected int |
getTotalChecksumsPerformed() |
void |
onWriteError(Exception e,
List<? extends org.duracloud.common.model.ContentItem> items) |
protected void |
retrieveFile(org.duracloud.common.model.ContentItem contentItem,
File directory) |
protected void |
retrieveFile(org.duracloud.common.model.ContentItem contentItem,
File directory,
boolean writeChecksums,
boolean lastItem) |
protected void |
retrieveSnapshotProperties() |
void |
write(List<? extends org.duracloud.common.model.ContentItem> items) |
protected void |
writeContentProperties(String contentId,
Map<String,String> props,
boolean lastItem) |
protected void |
writeMD5Checksum(String contentId,
String md5Checksum) |
protected void |
writeSHA256Checksum(String contentId,
String sha256Checksum) |
addError, addToItemsRead, addToLong, clearErrors, failExecution, getErrors, getExecutionContext, getItemsRead, getLongValue, getStepExecution, resetContextState, setIsTest, skipLinesAlreadyRead, verifySpacepublic SpaceItemWriter(Snapshot snapshot, org.duracloud.retrieval.source.RetrievalSource retrievalSource, File contentDir, org.duracloud.retrieval.mgmt.OutputWriter outputWriter, File propsFile, File md5ManifestFile, File sha256ManifestFile, SnapshotManager snapshotManager, SpaceManifestDpnManifestVerifier spaceManifestDpnManifestVerifier)
snapshot - retrievalSource - contentDir - outputWriter - propsFile - md5ManifestFile - sha256ManifestFile - snapshotManager - spaceManifestDpnManifestVerifier - protected void closeDatabase()
protected void deleteDatabase()
public void write(List<? extends org.duracloud.common.model.ContentItem> items) throws IOException
write in interface org.springframework.batch.item.ItemWriter<org.duracloud.common.model.ContentItem>IOExceptionprotected void retrieveFile(org.duracloud.common.model.ContentItem contentItem,
File directory)
throws IOException
IOExceptionprotected void retrieveFile(org.duracloud.common.model.ContentItem contentItem,
File directory,
boolean writeChecksums,
boolean lastItem)
throws IOException
IOExceptionprotected int getTotalChecksumsPerformed()
protected void writeMD5Checksum(String contentId, String md5Checksum) throws IOException
IOExceptionprotected void writeSHA256Checksum(String contentId, String sha256Checksum) throws IOException
IOExceptionprotected void writeContentProperties(String contentId, Map<String,String> props, boolean lastItem) throws IOException
IOExceptionprotected void retrieveSnapshotProperties()
public org.springframework.batch.core.ExitStatus afterStep(org.springframework.batch.core.StepExecution stepExecution)
afterStep in interface org.springframework.batch.core.StepExecutionListenerafterStep in class StepExecutionSupportpublic void beforeStep(org.springframework.batch.core.StepExecution stepExecution)
beforeStep in interface org.springframework.batch.core.StepExecutionListenerbeforeStep in class StepExecutionSupportpublic void onWriteError(Exception e, List<? extends org.duracloud.common.model.ContentItem> items)
onWriteError in interface org.springframework.batch.core.ItemWriteListener<org.duracloud.common.model.ContentItem>public void beforeWrite(List<? extends org.duracloud.common.model.ContentItem> items)
beforeWrite in interface org.springframework.batch.core.ItemWriteListener<org.duracloud.common.model.ContentItem>public void afterWrite(List<? extends org.duracloud.common.model.ContentItem> items)
afterWrite in interface org.springframework.batch.core.ItemWriteListener<org.duracloud.common.model.ContentItem>Copyright © 2014–2018 DuraSpace. All rights reserved.