Enum ReplicaType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ReplicaType>

    public enum ReplicaType
    extends java.lang.Enum<ReplicaType>
    Enumeration of the possible replica types used for replicas.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BITARCHIVE
      bitarchive replica which contain files stored in repository.
      CHECKSUM
      Checksum replica which contains checksums of files in repository.
      NO_REPLICA_TYPE
      If no replica type has been set.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ReplicaType fromOrdinal​(int ordinal)
      Helper method that gives a proper object from e.g.
      static ReplicaType fromSetting​(java.lang.String s)
      Helper method that gives a proper object from e.g.
      static ReplicaType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ReplicaType[] 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

      • BITARCHIVE

        public static final ReplicaType BITARCHIVE
        bitarchive replica which contain files stored in repository.
      • CHECKSUM

        public static final ReplicaType CHECKSUM
        Checksum replica which contains checksums of files in repository.
    • Method Detail

      • values

        public static ReplicaType[] 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 (ReplicaType c : ReplicaType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ReplicaType 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 ReplicaType fromOrdinal​(int ordinal)
        Helper method that gives a proper object from e.g. settings.
        Parameters:
        ordinal - a certain integer for a replica type
        Returns:
        the ReplicaType related to a certain integer
        Throws:
        ArgumentNotValid - If argument rt does not correspond to a ReplicaType
      • fromSetting

        public static ReplicaType fromSetting​(java.lang.String s)
        Helper method that gives a proper object from e.g. settings.
        Parameters:
        s - A string representing a ReplicaType.
        Returns:
        the ReplicaType related to a certain string; if the string does not correspond to a known replicatype, it returns NO_REPLICA_TYPE
        Throws:
        ArgumentNotValid - If argument s is null