Interface ChangeStreamRecordAdapter<ChangeStreamRecordT>

All Known Implementing Classes:
DefaultChangeStreamRecordAdapter

@InternalApi("Intended for use by the BigtableIO in apache/beam only.") public interface ChangeStreamRecordAdapter<ChangeStreamRecordT>
An extension point that allows end users to plug in a custom implementation of logical change stream records. This is useful in cases where the user would like to apply advanced client side filtering(for example, only keep DeleteFamily in the mutations). This adapter acts like a factory for a SAX style change stream record builder.
  • Method Details

    • createChangeStreamRecordBuilder

    • isHeartbeat

      @InternalApi("Intended for use by the BigtableIO in apache/beam only.") boolean isHeartbeat(ChangeStreamRecordT record)
      Checks if the given change stream record is a Heartbeat.
    • getTokenFromHeartbeat

      @InternalApi("Intended for use by the BigtableIO in apache/beam only.") String getTokenFromHeartbeat(ChangeStreamRecordT heartbeatRecord)
      Get the token from the given Heartbeat record. If the given record is not a Heartbeat, it will throw an Exception.
    • isChangeStreamMutation

      @InternalApi("Intended for use by the BigtableIO in apache/beam only.") boolean isChangeStreamMutation(ChangeStreamRecordT record)
      Checks if the given change stream record is a ChangeStreamMutation.
    • getTokenFromChangeStreamMutation

      @InternalApi("Intended for use by the BigtableIO in apache/beam only.") String getTokenFromChangeStreamMutation(ChangeStreamRecordT record)
      Get the token from the given ChangeStreamMutation record. If the given record is not a ChangeStreamMutation, it will throw an Exception.