Class HeartbeatRecord
java.lang.Object
org.apache.beam.sdk.io.gcp.spanner.changestreams.model.HeartbeatRecord
- All Implemented Interfaces:
Serializable,ChangeStreamRecord
@DefaultCoder(AvroCoder.class)
public class HeartbeatRecord
extends 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:
-
Constructor Summary
ConstructorsConstructorDescriptionHeartbeatRecord(com.google.cloud.Timestamp timestamp, ChangeStreamRecordMetadata metadata) Constructs the heartbeat record with the given timestamp and metadata. -
Method Summary
-
Constructor Details
-
HeartbeatRecord
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 Details
-
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
-
hashCode
public int hashCode() -
toString
-