Class HeartbeatEvent

java.lang.Object
io.debezium.connector.spanner.db.model.event.HeartbeatEvent
All Implemented Interfaces:
ChangeStreamEvent

public class HeartbeatEvent extends Object implements ChangeStreamEvent
Specific DTO for Spanner Heartbeat event
  • Field Details

    • timestamp

      private final com.google.cloud.Timestamp timestamp
    • metadata

      private final StreamEventMetadata metadata
  • Constructor Details

    • HeartbeatEvent

      public HeartbeatEvent(com.google.cloud.Timestamp timestamp, StreamEventMetadata 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 Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • 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 ChangeStreamEvent
      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
    • getMetadata

      public StreamEventMetadata getMetadata()
      Specified by:
      getMetadata in interface ChangeStreamEvent
    • toString

      public String toString()
      Overrides:
      toString in class Object