Class HeartbeatRecord
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.spanner.changestreams.model.HeartbeatRecord
-
- All Implemented Interfaces:
java.io.Serializable,ChangeStreamRecord
@DefaultCoder(org.apache.beam.sdk.extensions.avro.coders.AvroCoder.class) public class HeartbeatRecord extends java.lang.Object implements ChangeStreamRecord
A heartbeat record serves as a notification that the change stream query has returned all changes for the partition less or equal to the record timestamp.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HeartbeatRecord(com.google.cloud.Timestamp timestamp, ChangeStreamRecordMetadata metadata)Constructs the heartbeat record with the given timestamp and metadata.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)com.google.cloud.TimestampgetRecordTimestamp()Indicates the timestamp for which the change stream query has returned all changes.com.google.cloud.TimestampgetTimestamp()Indicates the timestamp for which the change stream query has returned all changes.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
HeartbeatRecord
public HeartbeatRecord(com.google.cloud.Timestamp timestamp, ChangeStreamRecordMetadata metadata)Constructs the heartbeat record with the given timestamp and metadata.- Parameters:
timestamp- the timestamp for which all changes in the partition have occurredmetadata- connector execution metadata for the given record
-
-
Method Detail
-
getRecordTimestamp
public com.google.cloud.Timestamp getRecordTimestamp()
Indicates the timestamp for which the change stream query has returned all changes. All records emitted after the heartbeat record will have a timestamp greater than this one.- Specified by:
getRecordTimestampin interfaceChangeStreamRecord- Returns:
- the timestamp for which the change stream query has returned all changes
-
getTimestamp
public com.google.cloud.Timestamp getTimestamp()
Indicates the timestamp for which the change stream query has returned all changes. All records emitted after the heartbeat record will have a timestamp greater than this one.- Returns:
- the timestamp for which the change stream query has returned all changes
-
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
-
-