Class AdminDataMessage
- java.lang.Object
-
- dk.netarkivet.common.distribute.NetarkivetMessage
-
- dk.netarkivet.archive.distribute.ArchiveMessage
-
- dk.netarkivet.archive.arcrepository.bitpreservation.AdminDataMessage
-
- All Implemented Interfaces:
Serializable
public class AdminDataMessage extends ArchiveMessage
Class encapsulating a request to update AdminData. The message has two different types: changestorestate-type, and changechecksum-type. There is a constructor for each type.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class dk.netarkivet.common.distribute.NetarkivetMessage
replyOfId
-
-
Constructor Summary
Constructors Constructor Description AdminDataMessage(String theFileName, String theChecksum)
Constructor used when you want to change the checksum for the given filename.AdminDataMessage(String theFileName, String theReplicaId, ReplicaStoreState newval)
Constructor used when you change the BitarchiveStoreState.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(ArchiveMessageVisitor v)
Should be implemented as a part of the visitor pattern.String
getChecksum()
String
getFileName()
Method for retrieving the name of the file which are refered to in this message.ReplicaStoreState
getNewvalue()
String
getReplicaId()
Method for retrieving the replica id from this message.boolean
isChangeChecksum()
Return the state of the changechecksum - flag.boolean
isChangeStoreState()
Return the state of the changestorestate - flag.-
Methods inherited from class dk.netarkivet.common.distribute.NetarkivetMessage
getErrMsg, getID, getReplyOfId, getReplyTo, getTo, hasBeenSent, isOk, setNotOk, setNotOk, toString
-
-
-
-
Constructor Detail
-
AdminDataMessage
public AdminDataMessage(String theFileName, String theReplicaId, ReplicaStoreState newval)
Constructor used when you change the BitarchiveStoreState.- Parameters:
theFileName
- The filename you want to give a new BitarchiveStoreState.theReplicaId
- The ID for the bitarchive where the file residesnewval
- The new BitarchiveStoreState
-
-
Method Detail
-
accept
public void accept(ArchiveMessageVisitor v)
Should be implemented as a part of the visitor pattern. fx.: public void accept(ArchiveMessageVisitor v) { v.visit(this); }- Specified by:
accept
in classArchiveMessage
- Parameters:
v
- A message visitor- See Also:
ArchiveMessageVisitor
-
getReplicaId
public String getReplicaId()
Method for retrieving the replica id from this message.- Returns:
- Returns the replicaId.
-
getFileName
public String getFileName()
Method for retrieving the name of the file which are refered to in this message.- Returns:
- Returns the fileName.
-
getChecksum
public String getChecksum()
- Returns:
- Returns the fileName.
-
isChangeStoreState
public boolean isChangeStoreState()
Return the state of the changestorestate - flag.- Returns:
- true, if this message is a changestorestate message
-
isChangeChecksum
public boolean isChangeChecksum()
Return the state of the changechecksum - flag.- Returns:
- true, if this message is a changechecksum message
-
getNewvalue
public ReplicaStoreState getNewvalue()
- Returns:
- Returns the newvalue.
-
-