|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.archive.arcrepositoryadmin.ArcRepositoryEntry
public class ArcRepositoryEntry
This class contains the information that we keep about each file in the arcrepository: Checksum and the store states for all bitarchives. TODO Maybe don't have the store state info for fully completed stores, or else use a slimmer map for it.
Field Summary | |
---|---|
(package private) static java.lang.String |
ENTRY_COMPONENT_SEPARATOR_STRING
String used to separate the different parts of the arcRepositoryEntry, when we write the entry to persistent storage. |
Constructor Summary | |
---|---|
ArcRepositoryEntry(java.lang.String filename,
java.lang.String md5sum,
StoreMessage replyInfo)
Create a new entry with given checksum and replyinfo. |
Method Summary | |
---|---|
(package private) StoreMessage |
getAndRemoveReplyInfo()
Get the reply info and remove it from the entry. |
java.lang.String |
getChecksum()
Get the checksum for this entry. |
(package private) java.lang.String |
getFilename()
Get the filename for this entry. |
ArchiveStoreState |
getGeneralStoreState()
Get the ArchiveStoreState for the entry in general. |
ReplicaStoreState |
getStoreState(java.lang.String baId)
Get the StoreState for this entry for a given bitarchive or null if none. |
(package private) boolean |
hasReplyInfo()
Returns information of whether a ReplyInfo object has been stored with this entry. |
(package private) boolean |
hasStoreState(java.lang.String bitArchive)
Check, if a given bitArchive has a StoreState connected to it. |
(package private) void |
output(java.io.PrintWriter o)
Write this object to persistent storage. |
(package private) void |
setChecksum(java.lang.String checksum)
Set the checksum for this entry. |
(package private) void |
setReplyInfo(StoreMessage replyInfo)
Set the replyInfo instance variable. |
(package private) void |
setStoreState(java.lang.String ba,
ReplicaStoreState state)
Set the StoreState for a specific bitarchive (set timestamp for last update to NOW). |
(package private) void |
setStoreState(java.lang.String baId,
ReplicaStoreState state,
java.util.Date lastchanged)
Set the StoreState for a specific bitarchive (set timestamp for last update to lastchanged). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final java.lang.String ENTRY_COMPONENT_SEPARATOR_STRING
Constructor Detail |
---|
public ArcRepositoryEntry(java.lang.String filename, java.lang.String md5sum, StoreMessage replyInfo)
filename
- The filename for this entrymd5sum
- The checksum for this entryreplyInfo
- The one-use-only reply info chunkMethod Detail |
---|
public ArchiveStoreState getGeneralStoreState()
Note that the storestate and the timestamp might not come from the same bitarchive.
void setStoreState(java.lang.String ba, ReplicaStoreState state)
ba
- a bitarchivestate
- the new StoreState for this bitarchive.void setStoreState(java.lang.String baId, ReplicaStoreState state, java.util.Date lastchanged)
baId
- a bitarchivestate
- the new StoreState for this bitarchive.lastchanged
- the time for when the state was changedpublic ReplicaStoreState getStoreState(java.lang.String baId)
baId
- a bitarchive id
java.lang.String getFilename()
void setChecksum(java.lang.String checksum)
checksum
- the new checksum for this entrypublic java.lang.String getChecksum()
StoreMessage getAndRemoveReplyInfo()
boolean hasReplyInfo()
void output(java.io.PrintWriter o)
o
- A stream to write to.boolean hasStoreState(java.lang.String bitArchive)
bitArchive
- a given bitarchive
void setReplyInfo(StoreMessage replyInfo)
replyInfo
- The new value for the replyInfo variable.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |