Class HeartbeatRecord

  • All Implemented Interfaces:
    java.io.Serializable, ChangeStreamRecord

    @DefaultCoder(org.apache.beam.sdk.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
      boolean equals​(java.lang.Object o)  
      com.google.cloud.Timestamp getRecordTimestamp()
      Indicates the timestamp for which the change stream query has returned all changes.
      com.google.cloud.Timestamp getTimestamp()
      Indicates the timestamp for which the change stream query has returned all changes.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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 occurred
        metadata - 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:
        getRecordTimestamp in interface ChangeStreamRecord
        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:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object