Enum ReplicaStoreState
- java.lang.Object
-
- java.lang.Enum<ReplicaStoreState>
-
- dk.netarkivet.common.distribute.arcrepository.ReplicaStoreState
-
- All Implemented Interfaces:
Serializable
,Comparable<ReplicaStoreState>
public enum ReplicaStoreState extends 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
Enum Constants Enum Constant Description 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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ReplicaStoreState
fromOrdinal(int ordinal)
static ReplicaStoreState
valueOf(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.
-
-
-
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(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
fromOrdinal
public static ReplicaStoreState fromOrdinal(int ordinal)
-
-