dk.netarkivet.common.distribute.arcrepository
Enum ReplicaStoreState

java.lang.Object
  extended by java.lang.Enum<ReplicaStoreState>
      extended by dk.netarkivet.common.distribute.arcrepository.ReplicaStoreState
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ReplicaStoreState>

public enum ReplicaStoreState
extends java.lang.Enum<ReplicaStoreState>

This class encapsulates the different upload states, while storing a file in the archive of a replica . Used by the classes ArcRepository, AdminData, and ArcRepositoryEntry. TODO Needs localisation.

See Also:
ArcRepository, AdminData, ArcRepositoryEntry

Enum Constant Summary
DATA_UPLOADED
          Data has been successfully uploaded to a replica archive.
UNKNOWN_UPLOAD_STATE
          If it is unknown whether a file has been successfully uploaded to a replica or not.
UPLOAD_COMPLETED
          Upload to replica archive completed, which means that it has been verified by a checksumJob.
UPLOAD_FAILED
          Upload to the replica archive has failed.
UPLOAD_STARTED
          Upload to a replica archive has started.
 
Method Summary
static ReplicaStoreState fromOrdinal(int i)
           
static ReplicaStoreState valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ReplicaStoreState[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UPLOAD_STARTED

public static final ReplicaStoreState UPLOAD_STARTED
Upload to a replica archive has started.


DATA_UPLOADED

public static final ReplicaStoreState DATA_UPLOADED
Data has been successfully uploaded to a replica archive.


UPLOAD_COMPLETED

public static final ReplicaStoreState UPLOAD_COMPLETED
Upload to replica archive completed, which means that it has been verified by a checksumJob.


UPLOAD_FAILED

public static final ReplicaStoreState UPLOAD_FAILED
Upload to the replica archive has failed.


UNKNOWN_UPLOAD_STATE

public static final ReplicaStoreState UNKNOWN_UPLOAD_STATE
If it is unknown whether a file has been successfully uploaded to a replica or not. Used in the database.

Method Detail

values

public static ReplicaStoreState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ReplicaStoreState c : ReplicaStoreState.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ReplicaStoreState valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

fromOrdinal

public static ReplicaStoreState fromOrdinal(int i)