Class PartitionEndRecord
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.spanner.changestreams.model.PartitionEndRecord
-
- All Implemented Interfaces:
java.io.Serializable,ChangeStreamRecord
@DefaultCoder(org.apache.beam.sdk.extensions.avro.coders.AvroCoder.class) public class PartitionEndRecord extends java.lang.Object implements ChangeStreamRecord
A partition end record serves as a notification that the client should stop reading the partition. No further records are expected to be retrieved on it.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PartitionEndRecord(com.google.cloud.Timestamp endTimestamp, java.lang.String recordSequence, ChangeStreamRecordMetadata metadata)Constructs the partition end record with the given timestamp, record sequence and metadata.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)com.google.cloud.TimestampgetEndTimestamp()The end timestamp at which the change stream partition is terminated.java.lang.StringgetRecordSequence()Indicates the order in which a record was put to the stream.com.google.cloud.TimestampgetRecordTimestamp()Indicates the timestamp for which the change stream partition is terminated.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
PartitionEndRecord
public PartitionEndRecord(com.google.cloud.Timestamp endTimestamp, java.lang.String recordSequence, ChangeStreamRecordMetadata metadata)Constructs the partition end record with the given timestamp, record sequence and metadata.- Parameters:
endTimestamp- end timestamp at which the change stream partition is terminatedrecordSequence- the order within a partition and a transaction in which the record was put to the streammetadata- connector execution metadata for the given record
-
-
Method Detail
-
getRecordTimestamp
public com.google.cloud.Timestamp getRecordTimestamp()
Indicates the timestamp for which the change stream partition is terminated.- Specified by:
getRecordTimestampin interfaceChangeStreamRecord- Returns:
- the timestamp for which the change stream partition is terminated
-
getEndTimestamp
public com.google.cloud.Timestamp getEndTimestamp()
The end timestamp at which the change stream partition is terminated.- Returns:
- the timestamp for which the change stream partition is terminated
-
getRecordSequence
public java.lang.String getRecordSequence()
Indicates the order in which a record was put to the stream. Is unique and increasing within a partition. It is relative to the scope of partition, commit timestamp, and server_transaction_id. It is useful for readers downstream to dedup any duplicate records that were read/recorded.- Returns:
- record sequence of the record
-
equals
public boolean equals(@Nullable java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-