@InterfaceStability.Evolving public enum RemoteLogSegmentState extends Enum<RemoteLogSegmentState>
It goes through the below state transitions. Self transition is treated as valid. This allows updating with the same state in case of retries and failover.
+---------------------+ +----------------------+
|COPY_SEGMENT_STARTED |----------> |COPY_SEGMENT_FINISHED |
+-------------------+-+ +--+-------------------+
| |
| |
v v
+--+-----------------+-+
|DELETE_SEGMENT_STARTED|
+-----------+----------+
|
|
v
+-----------+-----------+
|DELETE_SEGMENT_FINISHED|
+-----------------------+
| Enum Constant and Description |
|---|
COPY_SEGMENT_FINISHED
This state indicates that the segment copying to remote storage is finished.
|
COPY_SEGMENT_STARTED
This state indicates that the segment copying to remote storage is started but not yet finished.
|
DELETE_SEGMENT_FINISHED
This state indicates that the segment is deleted successfully.
|
DELETE_SEGMENT_STARTED
This state indicates that the segment deletion is started but not yet finished.
|
| Modifier and Type | Method and Description |
|---|---|
static RemoteLogSegmentState |
forId(byte id) |
byte |
id() |
static boolean |
isValidTransition(RemoteLogSegmentState srcState,
RemoteLogSegmentState targetState) |
static RemoteLogSegmentState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RemoteLogSegmentState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RemoteLogSegmentState COPY_SEGMENT_STARTED
public static final RemoteLogSegmentState COPY_SEGMENT_FINISHED
public static final RemoteLogSegmentState DELETE_SEGMENT_STARTED
public static final RemoteLogSegmentState DELETE_SEGMENT_FINISHED
public static RemoteLogSegmentState[] values()
for (RemoteLogSegmentState c : RemoteLogSegmentState.values()) System.out.println(c);
public static RemoteLogSegmentState valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic byte id()
public static RemoteLogSegmentState forId(byte id)
public static boolean isValidTransition(RemoteLogSegmentState srcState, RemoteLogSegmentState targetState)