Enum SentinelSequenceNumber
- java.lang.Object
-
- java.lang.Enum<SentinelSequenceNumber>
-
- org.apache.flink.streaming.connectors.kinesis.model.SentinelSequenceNumber
-
- All Implemented Interfaces:
Serializable,Comparable<SentinelSequenceNumber>
@Internal public enum SentinelSequenceNumber extends Enum<SentinelSequenceNumber>
Special flag values for sequence numbers in shards to indicate special positions. The value is initially set byFlinkKinesisConsumerwhenKinesisDataFetchers are created. The KinesisDataFetchers will use this value to determine how to retrieve the starting shard iterator from AWS Kinesis.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description SENTINEL_AT_TIMESTAMP_SEQUENCE_NUMFlag value for shard's sequence numbers to indicate that the shard should start to be read from the specified timestamp.SENTINEL_EARLIEST_SEQUENCE_NUMFlag value for shard's sequence numbers to indicate that the shard should start to be read from the earliest records that haven't expired yet.SENTINEL_LATEST_SEQUENCE_NUMFlag value for shard's sequence numbers to indicate that the shard should start to be read from the latest incoming records.SENTINEL_SHARD_ENDING_SEQUENCE_NUMFlag value to indicate that we have already read the last record of this shard (Note: Kinesis shards that have been closed due to a split or merge will have an ending data record).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SequenceNumberget()static booleanisSentinelSequenceNumber(SequenceNumber candidateSequenceNumber)Returnstrueif the givenSequenceNumberis a sentinel.static SentinelSequenceNumbervalueOf(String name)Returns the enum constant of this type with the specified name.static SentinelSequenceNumber[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SENTINEL_LATEST_SEQUENCE_NUM
public static final SentinelSequenceNumber SENTINEL_LATEST_SEQUENCE_NUM
Flag value for shard's sequence numbers to indicate that the shard should start to be read from the latest incoming records.
-
SENTINEL_EARLIEST_SEQUENCE_NUM
public static final SentinelSequenceNumber SENTINEL_EARLIEST_SEQUENCE_NUM
Flag value for shard's sequence numbers to indicate that the shard should start to be read from the earliest records that haven't expired yet.
-
SENTINEL_AT_TIMESTAMP_SEQUENCE_NUM
public static final SentinelSequenceNumber SENTINEL_AT_TIMESTAMP_SEQUENCE_NUM
Flag value for shard's sequence numbers to indicate that the shard should start to be read from the specified timestamp.
-
SENTINEL_SHARD_ENDING_SEQUENCE_NUM
public static final SentinelSequenceNumber SENTINEL_SHARD_ENDING_SEQUENCE_NUM
Flag value to indicate that we have already read the last record of this shard (Note: Kinesis shards that have been closed due to a split or merge will have an ending data record).
-
-
Method Detail
-
values
public static SentinelSequenceNumber[] 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 (SentinelSequenceNumber c : SentinelSequenceNumber.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SentinelSequenceNumber 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 nameNullPointerException- if the argument is null
-
get
public SequenceNumber get()
-
isSentinelSequenceNumber
public static boolean isSentinelSequenceNumber(SequenceNumber candidateSequenceNumber)
Returnstrueif the givenSequenceNumberis a sentinel.
-
-