Interface ViewerArcRepositoryClient

    • Method Detail

      • close

        void close()
        Call on shutdown to release external resources.
        Specified by:
        close in interface AutoCloseable
      • get

        BitarchiveRecord get​(String arcfile,
                             long index)
                      throws ArgumentNotValid
        Gets a single ARC record out of the ArcRepository.
        Parameters:
        arcfile - The name of a file containing the desired record.
        index - The offset of the desired record in the file
        Returns:
        a BitarchiveRecord-object, or null if request times out or object is not found.
        Throws:
        ArgumentNotValid - If the get operation failed.
      • getFile

        void getFile​(String arcfilename,
                     Replica replica,
                     File toFile)
        Retrieves a file from an ArcRepository and places it in a local file.
        Parameters:
        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.
        Throws:
        IOFailure - if there are problems getting a reply or the file could not be found.
      • batch

        BatchStatus batch​(FileBatchJob job,
                          String replicaId,
                          String... args)
        Runs a batch batch job on each file in the ArcRepository.
        Parameters:
        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.
        Returns:
        The status of the batch job after it ended.