|
||||||||||
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. The Arcrepository 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 appropriate 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 |
getBitarchiveClientFromLocationName(java.lang.String locationName)
Returns a bitarchive client based on a location name. |
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 PermissionDenied, IOFailure
IOFailure
- if admin data cannot be read/initialised or we cannot'
connect to some bitarchive.
PermissionDenied
- 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 succes or failure.
IOFailure
- If file couldn't be stores.public BitarchiveClient getBitarchiveClientFromLocationName(java.lang.String locationName) throws ArgumentNotValid
locationName
- the location name
ArgumentNotValid
- if locationName 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 |