|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BitPreservationDAO
This is an interface for communicating with bitpreservation databases.
Method Summary | |
---|---|
void |
addChecksumInformation(java.util.List<java.lang.String> checksumOutput,
Replica replica)
Given the output of a checksum job, add the results to the database. |
void |
addFileListInformation(java.util.List<java.lang.String> 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(java.lang.String filename)
Method for retrieving a replica which has the file and the checksum_status = OK. |
Replica |
getBitarchiveWithGoodFile(java.lang.String filename,
Replica badReplica)
Method for retrieving a replica which has the file and the checksum_status = OK. |
java.sql.Date |
getDateOfLastMissingFilesUpdate(Replica replica)
Get the date for the last file list job. |
java.sql.Date |
getDateOfLastWrongFilesUpdate(Replica replica)
Get the date for the last file list job. |
java.lang.Iterable<java.lang.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(java.lang.String filename,
Replica replica)
Method for retrieving the entry in the replicafileinfo table for a given file and replica. |
java.lang.Iterable<java.lang.String> |
getWrongFilesInLastUpdate(Replica replica)
Return files with filelist_status CORRUPT for the replica, but not present in the last missing files job. |
void |
updateChecksumInformationForFileOnReplica(java.lang.String filename,
java.lang.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(java.lang.String filename)
Method for updating the status for a specific file for all the replicas. |
Method Detail |
---|
void addChecksumInformation(java.util.List<java.lang.String> checksumOutput, Replica replica)
checksumOutput
- The parsed output of a GetAllChecksumMessage as a
list of ChecksumJob lines, i.e. filename##checksum.replica
- The replica this checksum job is for.void addFileListInformation(java.util.List<java.lang.String> filelistOutput, Replica replica)
filelistOutput
- The list of filenames for the given replica.replica
- The replica this filelist job is for.java.lang.Iterable<java.lang.String> getMissingFilesInLastUpdate(Replica replica)
replica
- The replica to check for.
java.lang.Iterable<java.lang.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.
java.sql.Date getDateOfLastMissingFilesUpdate(Replica replica)
replica
- The replica to get the date for.
java.sql.Date getDateOfLastWrongFilesUpdate(Replica replica)
replica
- The replica to get the date for.
Replica getBitarchiveWithGoodFile(java.lang.String filename)
filename
- The name of the file.
Replica getBitarchiveWithGoodFile(java.lang.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(java.lang.String filename)
filename
- The name of the file to update the status for.ReplicaFileInfo getReplicaFileInfo(java.lang.String filename, Replica replica)
filename
- The name of the file for the entry.replica
- The replica of the entry.
void updateChecksumInformationForFileOnReplica(java.lang.String filename, java.lang.String checksum, Replica replica)
filename
- Name of the file.checksum
- The checksum of the file.replica
- The replica where the file exists.void cleanup()
cleanup
in interface CleanupIF
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |