Class SequenceNumber
- java.lang.Object
-
- org.apache.flink.streaming.connectors.kinesis.model.SequenceNumber
-
- All Implemented Interfaces:
Serializable
@Internal public class SequenceNumber extends Object implements Serializable
A serializable representation of a Kinesis record's sequence number. It has two fields: the main sequence number, and also a subsequence number. If thisSequenceNumberis referring to an aggregated Kinesis record, the subsequence number will be a non-negative value representing the order of the sub-record within the aggregation.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SequenceNumber(String sequenceNumber)Create a new instance for a non-aggregated Kinesis record without a subsequence number.SequenceNumber(String sequenceNumber, long subSequenceNumber)Create a new instance, with the specified sequence number and subsequence number.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetSequenceNumber()longgetSubSequenceNumber()inthashCode()booleanisAggregated()StringtoString()
-
-
-
Constructor Detail
-
SequenceNumber
public SequenceNumber(String sequenceNumber)
Create a new instance for a non-aggregated Kinesis record without a subsequence number.- Parameters:
sequenceNumber- the sequence number
-
SequenceNumber
public SequenceNumber(String sequenceNumber, long subSequenceNumber)
Create a new instance, with the specified sequence number and subsequence number. To represent the sequence number for a non-aggregated Kinesis record, the subsequence number should be -1. Otherwise, give a non-negative sequence number to represent an aggregated Kinesis record.- Parameters:
sequenceNumber- the sequence numbersubSequenceNumber- the subsequence number (-1 to represent non-aggregated Kinesis records)
-
-
Method Detail
-
isAggregated
public boolean isAggregated()
-
getSequenceNumber
public String getSequenceNumber()
-
getSubSequenceNumber
public long getSubSequenceNumber()
-
-