Package io.debezium.pipeline.txmetadata
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 Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.apache.kafka.connect.data.Schemaprotected org.apache.kafka.connect.data.Schemaprotected org.apache.kafka.connect.data.SchemaFields inherited from interface io.debezium.pipeline.txmetadata.TransactionStructMaker
DEBEZIUM_TRANSACTION_COLLECTION_KEY, DEBEZIUM_TRANSACTION_DATA_COLLECTION_ORDER_KEY, DEBEZIUM_TRANSACTION_DATA_COLLECTIONS_KEY, DEBEZIUM_TRANSACTION_EVENT_COUNT_KEY, DEBEZIUM_TRANSACTION_ID_KEY, DEBEZIUM_TRANSACTION_KEY, DEBEZIUM_TRANSACTION_STATUS_KEY, DEBEZIUM_TRANSACTION_TOTAL_ORDER_KEY, DEBEZIUM_TRANSACTION_TS_MS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.kafka.connect.data.StructaddTransactionBlock(OffsetContext offsetContext, long dataCollectionEventOrder, org.apache.kafka.connect.data.Struct value) Adds the transaction block to the data change messageorg.apache.kafka.connect.data.StructbuildBeginTransactionValue(OffsetContext offsetContext, Instant timestamp) Creates the value struct for a transaction begin messageorg.apache.kafka.connect.data.StructbuildEndTransactionValue(OffsetContext offsetContext, Instant timestamp) Creates the value struct for a transaction end messageorg.apache.kafka.connect.data.StructbuildTransactionKey(OffsetContext offsetContext) Creates the key struct for the transaction messageorg.apache.kafka.connect.data.SchemaGet the schema for the event count per data collectionorg.apache.kafka.connect.data.SchemaGet the schema for the transaction key of a begin/end eventorg.apache.kafka.connect.data.SchemaGet the schema for the transaction value of a begin/end eventMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.debezium.pipeline.txmetadata.TransactionStructMaker
getTransactionBlockSchema
-
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
-
-
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:TransactionStructMakerAdds the transaction block to the data change message- Specified by:
addTransactionBlockin interfaceTransactionStructMaker- Parameters:
offsetContext- current offsetContext used to get transaction metadatadataCollectionEventOrder- the event order for the data collection of this transactionvalue- 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:TransactionStructMakerCreates the value struct for a transaction end message- Specified by:
buildEndTransactionValuein interfaceTransactionStructMaker- Parameters:
offsetContext- current offsetContext used to get transaction metadatatimestamp- 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:TransactionStructMakerCreates the value struct for a transaction begin message- Specified by:
buildBeginTransactionValuein interfaceTransactionStructMaker- Parameters:
offsetContext- current offsetContext used to get transaction metadatatimestamp- timestamp of the transaction- Returns:
- begin transaction struct
-
buildTransactionKey
Description copied from interface:TransactionStructMakerCreates the key struct for the transaction message- Specified by:
buildTransactionKeyin interfaceTransactionStructMaker- 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:TransactionStructMakerGet the schema for the event count per data collection- Specified by:
getEventCountPerDataCollectionSchemain interfaceTransactionStructMaker- Returns:
-
getTransactionKeySchema
public org.apache.kafka.connect.data.Schema getTransactionKeySchema()Description copied from interface:TransactionStructMakerGet the schema for the transaction key of a begin/end event- Specified by:
getTransactionKeySchemain interfaceTransactionStructMaker- Returns:
-
getTransactionValueSchema
public org.apache.kafka.connect.data.Schema getTransactionValueSchema()Description copied from interface:TransactionStructMakerGet the schema for the transaction value of a begin/end event- Specified by:
getTransactionValueSchemain interfaceTransactionStructMaker- Returns:
-