Enum Class RemoteLogSegmentState
java.lang.Object
java.lang.Enum<RemoteLogSegmentState>
org.apache.kafka.server.log.remote.storage.RemoteLogSegmentState
- All Implemented Interfaces:
- Serializable,- Comparable<RemoteLogSegmentState>,- Constable
This enum indicates the state of the remote log segment. This will be based on the action executed on this
 segment by the remote log service implementation.
 
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|
                  +-----------------------+
 - 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionThis state indicates that the segment copying to remote storage is finished.This state indicates that the segment copying to remote storage is started but not yet finished.This state indicates that the segment is deleted successfully.This state indicates that the segment deletion is started but not yet finished.
- 
Method SummaryModifier and TypeMethodDescriptionstatic RemoteLogSegmentStateforId(byte id) byteid()static booleanisValidTransition(RemoteLogSegmentState srcState, RemoteLogSegmentState targetState) static RemoteLogSegmentStateReturns the enum constant of this class with the specified name.static RemoteLogSegmentState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
COPY_SEGMENT_STARTEDThis state indicates that the segment copying to remote storage is started but not yet finished.
- 
COPY_SEGMENT_FINISHEDThis state indicates that the segment copying to remote storage is finished.
- 
DELETE_SEGMENT_STARTEDThis state indicates that the segment deletion is started but not yet finished.
- 
DELETE_SEGMENT_FINISHEDThis state indicates that the segment is deleted successfully.
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
idpublic byte id()
- 
forId
- 
isValidTransitionpublic static boolean isValidTransition(RemoteLogSegmentState srcState, RemoteLogSegmentState targetState) 
 
-