Enum SegmentAction

  • All Implemented Interfaces:
    Serializable, Comparable<SegmentAction>

    public enum SegmentAction
    extends Enum<SegmentAction>
    Represents actions that can be performed on a server for a single segment.

    The different action types can be used to prioritize items in a LoadQueuePeon.

    • Enum Constant Detail

      • DROP

        public static final SegmentAction DROP
        Drop a segment from a server.
      • LOAD

        public static final SegmentAction LOAD
        Load a segment on a server. This should be used when trying to load a segment on a tier where it is currently unavailable (i.e. no replicas loaded). This action cannot be throttled by the replicationThrottleLimit.
      • REPLICATE

        public static final SegmentAction REPLICATE
        Load a replica of a segment on a server. This should be used when trying to load more replicas of a segment on a tier where it is already available (i.e. atleast one loaded replica).

        This is different from LOAD in two ways:

        • this action can be throttled by the replicationThrottleLimit
        • it is given lower priority than LOAD on the load queue peon
        For all other purposes, REPLICATE is treated the same as LOAD.
      • MOVE_TO

        public static final SegmentAction MOVE_TO
        Move a segment to this server.
      • MOVE_FROM

        public static final SegmentAction MOVE_FROM
        Move a segment from this server to another. This is essentially a pending DROP operation, which starts only when the corresponding MOVE_TO has succeded.
    • Method Detail

      • values

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

        public static SegmentAction 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 name
        NullPointerException - if the argument is null
      • isLoad

        public boolean isLoad()
        True only if this action loads a segment on a server, i.e. LOAD, REPLICATE or MOVE_TO.