|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.archive.arcrepositoryadmin.AdminData
@Deprecated public abstract class AdminData
Class for accessing and manipulating the administrative data for
the ArcRepository.
In the current implementation, it consists of a file with a number of lines
of the form:
Field Summary | |
---|---|
protected static java.lang.String |
ADMIN_FILE_NAME
Deprecated. The name of the admin file. |
protected java.io.File |
adminDataFile
Deprecated. The File object for the admin data file. |
protected java.io.File |
adminDir
Deprecated. The directory where the admin data resides, currently the directory: Settings.DIRS_ARCREPOSITORY_ADMIN. |
protected java.util.List<java.lang.String> |
knownBitArchives
Deprecated. List containing the names of all knownBitArchives. |
protected java.util.Map<java.lang.String,ArcRepositoryEntry> |
storeEntries
Deprecated. Map containing a mapping from arcfilename to ArcRepositoryEntry. |
static java.lang.String |
VERSION_NUMBER
Deprecated. Admindata version. |
Constructor Summary | |
---|---|
protected |
AdminData()
Deprecated. Common constructor for admin data. |
Method Summary | |
---|---|
java.util.Set<java.lang.String> |
getAllFileNames()
Deprecated. Returns a set of the all arcfile names in the repository. |
java.util.Set<java.lang.String> |
getAllFileNames(Replica replica,
ReplicaStoreState state)
Deprecated. Returns a set of the arcfile names that are in a given state for a specific bitarchive in the repository. |
java.lang.String |
getCheckSum(java.lang.String arcfileName)
Deprecated. Get Checksum for a given arcfile. |
ArcRepositoryEntry |
getEntry(java.lang.String arcfileName)
Deprecated. Return the ArcRepositoryEntry for a certain arcfileName. |
static ReadOnlyAdminData |
getReadOnlyInstance()
Deprecated. Returns a read-only AdminData instance. |
ReplicaStoreState |
getState(java.lang.String arcfileName,
java.lang.String replicaChannelName)
Deprecated. Retrieves the storage state of a file for a specific replica. |
static UpdateableAdminData |
getUpdateableInstance()
Deprecated. Returns the one and only AdminData instance. |
boolean |
hasEntry(java.lang.String arcfileName)
Deprecated. Check, if there is an entry for a certain arcfile? |
boolean |
hasReplyInfo(java.lang.String arcfileName)
Deprecated. Tells whether there is a replyInfo associated with the given arcfile. |
boolean |
hasState(java.lang.String arcfileName,
java.lang.String replicaChannelName)
Deprecated. Returns whether or not a BitArchiveStoreState is registered for the given ARC file at the given bit archive. |
protected void |
read()
Deprecated. Reads the admin data from a file. |
java.lang.String |
toString()
Deprecated. Return info about current object as String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VERSION_NUMBER
protected java.util.Map<java.lang.String,ArcRepositoryEntry> storeEntries
protected java.io.File adminDir
protected static final java.lang.String ADMIN_FILE_NAME
protected java.util.List<java.lang.String> knownBitArchives
protected final java.io.File adminDataFile
Constructor Detail |
---|
protected AdminData()
Method Detail |
---|
public static UpdateableAdminData getUpdateableInstance()
public static ReadOnlyAdminData getReadOnlyInstance()
public boolean hasEntry(java.lang.String arcfileName)
arcfileName
- A given arcfile
public ArcRepositoryEntry getEntry(java.lang.String arcfileName)
arcfileName
- a certain filename
public boolean hasReplyInfo(java.lang.String arcfileName)
arcfileName
- The arc file we want to reply a store request for.
public boolean hasState(java.lang.String arcfileName, java.lang.String replicaChannelName)
arcfileName
- The file to retrieve the state forreplicaChannelName
- The name of the identification channel for
the replica the state should be retrieved for.
public ReplicaStoreState getState(java.lang.String arcfileName, java.lang.String replicaChannelName) throws UnknownID
arcfileName
- The file to retrieve the state for.replicaChannelName
- The name of the identification channel for
the replica the state should be retrieved for.
UnknownID
- When no record exists.public java.lang.String getCheckSum(java.lang.String arcfileName) throws ArgumentNotValid, UnknownID
arcfileName
- Unique reference to file for which to
retrieve checksum
UnknownID
- if the file is not registered
ArgumentNotValid
- If the arcFileName is either null or the empty
string.protected void read() throws IOFailure
IOFailure
- on trouble reading from filepublic java.util.Set<java.lang.String> getAllFileNames()
public java.util.Set<java.lang.String> getAllFileNames(Replica replica, ReplicaStoreState state)
replica
- the object representing the BAstate
- the state to look for, e.g.
ReplicaStoreState.STATE_COMPLETED
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |