Class AbstractTransactionStructMaker

java.lang.Object
io.debezium.pipeline.txmetadata.AbstractTransactionStructMaker
All Implemented Interfaces:
TransactionStructMaker
Direct Known Subclasses:
DefaultTransactionStructMaker

public abstract class AbstractTransactionStructMaker extends Object implements TransactionStructMaker
  • Field Details

    • EVENT_COUNT_PER_DATA_COLLECTION_SCHEMA

      protected static final org.apache.kafka.connect.data.Schema EVENT_COUNT_PER_DATA_COLLECTION_SCHEMA
    • transactionKeySchema

      protected org.apache.kafka.connect.data.Schema transactionKeySchema
    • transactionValueSchema

      protected org.apache.kafka.connect.data.Schema transactionValueSchema
  • Constructor Details

    • AbstractTransactionStructMaker

      public AbstractTransactionStructMaker(Configuration config)
  • Method Details

    • addTransactionBlock

      public org.apache.kafka.connect.data.Struct addTransactionBlock(OffsetContext offsetContext, long dataCollectionEventOrder, org.apache.kafka.connect.data.Struct value)
      Description copied from interface: TransactionStructMaker
      Adds the transaction block to the data change message
      Specified by:
      addTransactionBlock in interface TransactionStructMaker
      Parameters:
      offsetContext - current offsetContext used to get transaction metadata
      dataCollectionEventOrder - the event order for the data collection of this transaction
      value - the data change struct to add the transaction block to
      Returns:
      the updated struct with the transaction block
    • buildEndTransactionValue

      public org.apache.kafka.connect.data.Struct buildEndTransactionValue(OffsetContext offsetContext, Instant timestamp)
      Description copied from interface: TransactionStructMaker
      Creates the value struct for a transaction end message
      Specified by:
      buildEndTransactionValue in interface TransactionStructMaker
      Parameters:
      offsetContext - current offsetContext used to get transaction metadata
      timestamp - timestamp of the transaction
      Returns:
      end transaction struct
    • buildBeginTransactionValue

      public org.apache.kafka.connect.data.Struct buildBeginTransactionValue(OffsetContext offsetContext, Instant timestamp)
      Description copied from interface: TransactionStructMaker
      Creates the value struct for a transaction begin message
      Specified by:
      buildBeginTransactionValue in interface TransactionStructMaker
      Parameters:
      offsetContext - current offsetContext used to get transaction metadata
      timestamp - timestamp of the transaction
      Returns:
      begin transaction struct
    • buildTransactionKey

      public org.apache.kafka.connect.data.Struct buildTransactionKey(OffsetContext offsetContext)
      Description copied from interface: TransactionStructMaker
      Creates the key struct for the transaction message
      Specified by:
      buildTransactionKey in interface TransactionStructMaker
      Parameters:
      offsetContext - current offsetContext used to get transaction metadata
      Returns:
      key transaction struct
    • getEventCountPerDataCollectionSchema

      public org.apache.kafka.connect.data.Schema getEventCountPerDataCollectionSchema()
      Description copied from interface: TransactionStructMaker
      Get the schema for the event count per data collection
      Specified by:
      getEventCountPerDataCollectionSchema in interface TransactionStructMaker
      Returns:
    • getTransactionKeySchema

      public org.apache.kafka.connect.data.Schema getTransactionKeySchema()
      Description copied from interface: TransactionStructMaker
      Get the schema for the transaction key of a begin/end event
      Specified by:
      getTransactionKeySchema in interface TransactionStructMaker
      Returns:
    • getTransactionValueSchema

      public org.apache.kafka.connect.data.Schema getTransactionValueSchema()
      Description copied from interface: TransactionStructMaker
      Get the schema for the transaction value of a begin/end event
      Specified by:
      getTransactionValueSchema in interface TransactionStructMaker
      Returns: