|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.archive.arcrepository.ArcRepository
public class ArcRepository
The Arcrepository handles the communication with the different bitarchives. This class ensures that arc files are stored in all available bitarchives and verifies that the storage process succeeded. Retrieval of data from a bitarchive goes through the JMSArcRepositoryClient that contacts the appropriate (typically nearest) bitarchive and retrieves data from this archive. Batch execution is sent to the bitarchive(s). Correction operations are typically only allowed on one bitarchive.
Method Summary | |
---|---|
void |
cleanup()
closes all connections and nulls the instance. |
void |
close()
Close all bitarchive connections, open loggers, and the ArcRepository handler. |
BitarchiveClient |
getBitarchiveClientFromReplicaId(java.lang.String replicaId)
Returns a bitarchive client based on a replica id. |
static ArcRepository |
getInstance()
Returns the unique ArcRepository instance. |
void |
onBatchReply(BatchReplyMessage msg)
Called when we receive replies on our checksum batch jobs. |
void |
onUpload(UploadMessage msg)
Event handler for upload messages reporting the upload result. |
void |
removeAndGetFile(RemoveAndGetFileMessage msg)
Forwards a RemoveAndGetFileMessage to the designated bitarchive. |
void |
store(RemoteFile rf,
StoreMessage replyInfo)
Stores a file in all known Bitarchives. |
void |
updateAdminData(AdminDataMessage msg)
Change admin data entry for a given file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ArcRepository getInstance() throws IllegalState, IOFailure
IOFailure
- if admin data cannot be read/initialised or we cannot'
connect to some bitarchive.
IllegalState
- if inconsistent channel info is given in settings.public void store(RemoteFile rf, StoreMessage replyInfo) throws IOFailure
rf
- A remotefile to be stored.replyInfo
- A StoreMessage used to reply with success or failure.
IOFailure
- If file couldn't be stored.
ArgumentNotValid
- if a input parameter is nullpublic BitarchiveClient getBitarchiveClientFromReplicaId(java.lang.String replicaId) throws ArgumentNotValid
replicaId
- the replica id
ArgumentNotValid
- if replicaId parameter is nullpublic void onUpload(UploadMessage msg)
msg
- an UploadMessagepublic void onBatchReply(BatchReplyMessage msg)
msg
- a BatchReplyMessagepublic void updateAdminData(AdminDataMessage msg)
msg
- an AdminDataMessage objectpublic void removeAndGetFile(RemoveAndGetFileMessage msg)
msg
- the message to forward to a bitarchivepublic void close()
public void cleanup()
cleanup
in interface CleanupIF
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |