public interface ViewerArcRepositoryClient
Modifier and Type | Method and Description |
---|---|
BatchStatus |
batch(FileBatchJob job,
String replicaId,
String... args)
Runs a batch batch job on each file in the ArcRepository.
|
void |
close()
Call on shutdown to release external resources.
|
BitarchiveRecord |
get(String arcfile,
long index)
Gets a single ARC record out of the ArcRepository.
|
void |
getFile(String arcfilename,
Replica replica,
File toFile)
Retrieves a file from an ArcRepository and places it in a local file.
|
void close()
BitarchiveRecord get(String arcfile, long index) throws ArgumentNotValid
arcfile
- The name of a file containing the desired record.index
- The offset of the desired record in the fileArgumentNotValid
- If the get operation failed.void getFile(String arcfilename, Replica replica, File toFile)
arcfilename
- Name of the arcfile to retrieve.replica
- The bitarchive to retrieve the data from.toFile
- Filename of a place where the file fetched can be put.IOFailure
- if there are problems getting a reply or the file could not be found.BatchStatus batch(FileBatchJob job, String replicaId, String... args)
job
- An object that implements the FileBatchJob interface. The initialize() method will be called before
processing and the finish() method will be called afterwards. The process() method will be called with each File
entry. An optional function postProcess() allows handling the combined results of the batchjob, e.g. summing the
results, sorting, etc.replicaId
- The archive to execute the job on.args
- The arguments for the batchjob.Copyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.