public interface BitPreservationDAO extends CleanupIF
Modifier and Type | Method and Description |
---|---|
void |
addChecksumInformation(File checksumOutput,
Replica replica)
Given the output of a checksum job, add the results to the database.
|
void |
addFileListInformation(File filelistOutput,
Replica replica)
Given the output of a file list job, add the results to the database.
|
void |
cleanup()
Method for cleaning up when done.
|
Replica |
getBitarchiveWithGoodFile(String filename)
Method for retrieving a replica which has the file and the checksum_status = OK.
|
Replica |
getBitarchiveWithGoodFile(String filename,
Replica badReplica)
Method for retrieving a replica which has the file and the checksum_status = OK.
|
Date |
getDateOfLastMissingFilesUpdate(Replica replica)
Get the date for the last file list job.
|
Date |
getDateOfLastWrongFilesUpdate(Replica replica)
Get the date for the last file list job.
|
Iterable<String> |
getMissingFilesInLastUpdate(Replica replica)
Return files with upload_status = COMPLETE for the replica, but the filelist_status = MISSING.
|
long |
getNumberOfFiles(Replica replica)
Returns the count of files in the replica which is not missing.
|
long |
getNumberOfMissingFilesInLastUpdate(Replica replica)
Return the count of missing files for replica.
|
long |
getNumberOfWrongFilesInLastUpdate(Replica replica)
Return the count of corrupt files for replica.
|
ReplicaFileInfo |
getReplicaFileInfo(String filename,
Replica replica)
Method for retrieving the entry in the replicafileinfo table for a given file and replica.
|
Iterable<String> |
getWrongFilesInLastUpdate(Replica replica)
Return files with filelist_status CORRUPT for the replica, but not present in the last missing files job.
|
void |
updateChecksumInformationForFileOnReplica(String filename,
String checksum,
Replica replica)
Method for updating a specific entry in the replicafileinfo table.
|
void |
updateChecksumStatus()
Method for updating the status for the files for all the replicas.
|
void |
updateChecksumStatus(String filename)
Method for updating the status for a specific file for all the replicas.
|
void addChecksumInformation(File checksumOutput, Replica replica)
checksumOutput
- The parsed output of a GetAllChecksumMessage as a File with ChecksumJob lines, i.e.
filename##checksum.replica
- The replica this checksum job is for.void addFileListInformation(File filelistOutput, Replica replica)
filelistOutput
- A file with a list of filenames for the given replica.replica
- The replica this filelist job is for.Iterable<String> getMissingFilesInLastUpdate(Replica replica)
replica
- The replica to check for.Iterable<String> getWrongFilesInLastUpdate(Replica replica)
replica
- The replica to check for.long getNumberOfMissingFilesInLastUpdate(Replica replica)
replica
- The replica to get the count for.long getNumberOfWrongFilesInLastUpdate(Replica replica)
replica
- The replica to get the count for.long getNumberOfFiles(Replica replica)
replica
- The replica to have the files.Date getDateOfLastMissingFilesUpdate(Replica replica)
replica
- The replica to get the date for.Date getDateOfLastWrongFilesUpdate(Replica replica)
replica
- The replica to get the date for.Replica getBitarchiveWithGoodFile(String filename)
filename
- The name of the file.Replica getBitarchiveWithGoodFile(String filename, Replica badReplica)
filename
- The name of the file.badReplica
- A replica which is known to contain a corrupt instance of this file.void updateChecksumStatus()
void updateChecksumStatus(String filename)
filename
- The name of the file to update the status for.ReplicaFileInfo getReplicaFileInfo(String filename, Replica replica)
filename
- The name of the file for the entry.replica
- The replica of the entry.void updateChecksumInformationForFileOnReplica(String filename, String checksum, Replica replica)
filename
- Name of the file.checksum
- The checksum of the file.replica
- The replica where the file exists.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.