Class StartingPosition
- java.lang.Object
-
- org.apache.flink.streaming.connectors.kinesis.model.StartingPosition
-
@Internal public class StartingPosition extends Object
The position in which to start consuming from a stream.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StartingPositioncontinueFromSequenceNumber(SequenceNumber sequenceNumber)Returns the starting position for the next record to consume from the given sequence number.static StartingPositionfromTimestamp(Date date)com.amazonaws.services.kinesis.model.ShardIteratorTypegetShardIteratorType()ObjectgetStartingMarker()static StartingPositionrestartFromSequenceNumber(SequenceNumber sequenceNumber)Returns the starting position to restart record consumption from the given sequence number after failure.
-
-
-
Method Detail
-
getShardIteratorType
public com.amazonaws.services.kinesis.model.ShardIteratorType getShardIteratorType()
-
fromTimestamp
public static StartingPosition fromTimestamp(Date date)
-
continueFromSequenceNumber
public static StartingPosition continueFromSequenceNumber(SequenceNumber sequenceNumber)
Returns the starting position for the next record to consume from the given sequence number. The difference betweenrestartFromSequenceNumber()andcontinueFromSequenceNumber()is that forrestartFromSequenceNumber()aggregated records are reread to support subsequence failure.- Parameters:
sequenceNumber- the last successful sequence number, or sentinel marker- Returns:
- the start position in which to consume from
-
restartFromSequenceNumber
public static StartingPosition restartFromSequenceNumber(SequenceNumber sequenceNumber)
Returns the starting position to restart record consumption from the given sequence number after failure. The difference betweenrestartFromSequenceNumber()andcontinueFromSequenceNumber()is that forrestartFromSequenceNumber()aggregated records are reread to support subsequence failure.- Parameters:
sequenceNumber- the last successful sequence number, or sentinel marker- Returns:
- the start position in which to consume from
-
-