Enum SegmentAction
- All Implemented Interfaces:
Serializable,Comparable<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 Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionbooleanisLoad()True only if this action loads a segment on a server, i.e.static SegmentActionReturns the enum constant of this type with the specified name.static SegmentAction[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DROP
Drop a segment from a server. -
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 thereplicationThrottleLimit. -
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
- this action can be throttled by the
-
MOVE_TO
Move a segment to this server. -
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 Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
isLoad
public boolean isLoad()True only if this action loads a segment on a server, i.e. LOAD, REPLICATE or MOVE_TO.
-