public abstract class ArchiveBatchJobBase extends FileBatchJob
FileBatchJob.ExceptionOccurrence
Modifier and Type | Field and Description |
---|---|
protected int |
noOfRecordsProcessed
The total number of records processed.
|
batchJobTimeout, exceptions, filesFailed, noOfFilesProcessed
Constructor and Description |
---|
ArchiveBatchJobBase() |
Modifier and Type | Method and Description |
---|---|
abstract void |
finish(OutputStream os)
Finish up the job.
|
Exception[] |
getExceptionArray()
Returns a representation of the list of Exceptions recorded for this archive batch job.
|
void |
handleException(Exception e,
File archiveFile,
long index)
When the org.archive.io.arc classes throw IOExceptions while reading, this is where they go.
|
protected void |
handleOurException(NetarkivetException e,
File archiveFile,
long index)
Private method that handles our exception.
|
abstract void |
initialize(OutputStream os)
Initialize the job before running.
|
int |
noOfRecordsProcessed()
Returns the number of records processed.
|
addException, addFinishException, addInitializeException, getBatchJobTimeout, getExceptions, getFilenamePattern, getFilesFailed, getNoOfFilesProcessed, maxExceptionsReached, postProcess, processFile, processOnlyFileNamed, processOnlyFilesMatching, processOnlyFilesMatching, processOnlyFilesNamed, setBatchJobTimeout
protected int noOfRecordsProcessed
public ArchiveBatchJobBase()
public abstract void initialize(OutputStream os)
initialize
in class FileBatchJob
os
- The OutputStream to which output data is writtenpublic abstract void finish(OutputStream os)
finish
in class FileBatchJob
os
- The OutputStream to which output data is writtenprotected void handleOurException(NetarkivetException e, File archiveFile, long index)
e
- the given exceptionarchiveFile
- The archive file where the exception occurred.index
- The offset in the archive file where the exception occurred.public void handleException(Exception e, File archiveFile, long index) throws ArgumentNotValid
e
- An Exception thrown by the org.archive.io.arc classes.archiveFile
- The archive file that was processed while the Exception was thrownindex
- The index (in the archive file) at which the Exception was thrownArgumentNotValid
- if e is nullpublic Exception[] getExceptionArray()
public int noOfRecordsProcessed()
Copyright © 2005–2016 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.