Class DataChangeEvent
java.lang.Object
io.debezium.connector.spanner.db.model.event.DataChangeEvent
- All Implemented Interfaces:
ChangeStreamEvent
Specific DTO for Spanner Change Stream Data-change event
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.google.cloud.Timestampprivate final booleanprivate final booleanprivate final StreamEventMetadataprivate final ModTypeprivate final longprivate final longprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final ValueCaptureType -
Constructor Summary
ConstructorsConstructorDescriptionDataChangeEvent(String partitionToken, com.google.cloud.Timestamp commitTimestamp, String serverTransactionId, boolean isLastRecordInTransactionInPartition, String recordSequence, String tableName, List<Column> rowType, List<Mod> mods, ModType modType, ValueCaptureType valueCaptureType, long numberOfRecordsInTransaction, long numberOfPartitionsInTransaction, String transactionTag, boolean isSystemTransaction, StreamEventMetadata metadata) Constructs a data change record for a given partition, at a given timestamp, for a given transaction. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.cloud.TimestampThe timestamp at which the modifications within were committed in Cloud Spanner.The connector execution metadata for this record.getMods()The modifications within this record.The type of operation that caused the modifications within this record.longThe total number of partitions for the given transaction.longThe total number of data change records for the given transaction.The unique identifier of the partition that generated this record.Indicates the order in which this record was put into the change stream in the scope of a partition, commit timestamp and transaction tuple.com.google.cloud.TimestampThe timestamp at which the modifications within were committed in Cloud Spanner.The type of the primary keys and modified columns within this record.The unique transaction id in which the modifications occurred.The name of the table in which the modifications within this record occurred.Transaction tag associated with this transaction.The capture type of the change stream that generated this record.booleanIndicates whether this record is the last emitted for the given transaction in the given partition.booleanIndicates whether the transaction is a system transaction.toString()
-
Field Details
-
partitionToken
-
commitTimestamp
private final com.google.cloud.Timestamp commitTimestamp -
serverTransactionId
-
isLastRecordInTransactionInPartition
private final boolean isLastRecordInTransactionInPartition -
recordSequence
-
tableName
-
rowType
-
mods
-
modType
-
valueCaptureType
-
numberOfRecordsInTransaction
private final long numberOfRecordsInTransaction -
numberOfPartitionsInTransaction
private final long numberOfPartitionsInTransaction -
transactionTag
-
isSystemTransaction
private final boolean isSystemTransaction -
metadata
-
-
Constructor Details
-
DataChangeEvent
public DataChangeEvent(String partitionToken, com.google.cloud.Timestamp commitTimestamp, String serverTransactionId, boolean isLastRecordInTransactionInPartition, String recordSequence, String tableName, List<Column> rowType, List<Mod> mods, ModType modType, ValueCaptureType valueCaptureType, long numberOfRecordsInTransaction, long numberOfPartitionsInTransaction, String transactionTag, boolean isSystemTransaction, StreamEventMetadata metadata) Constructs a data change record for a given partition, at a given timestamp, for a given transaction. The data change record needs to be given information about the table modified, the type of primary keys and modified columns, the modifications themselves and other metadata.- Parameters:
partitionToken- the unique identifier of the partition that generated this recordcommitTimestamp- the timestamp at which the modifications within were committed in Cloud SpannerserverTransactionId- the unique transaction id in which the modifications occurredisLastRecordInTransactionInPartition- indicates whether this record is the last emitted for the given transaction in the given partitionrecordSequence- indicates the order in which this record was put into the change stream in the scope of a partition, commit timestamp and transaction tupletableName- the name of the table in which the modifications occurredrowType- the type of the primary keys and modified columnsmods- the modifications occurredmodType- the operation that caused the modification to occurvalueCaptureType- the capture type of the change streamnumberOfRecordsInTransaction- the total number of records for the given transactionnumberOfPartitionsInTransaction- the total number of partitions within the given transactionmetadata- connector execution metadata for the given record
-
-
Method Details
-
getRecordTimestamp
public com.google.cloud.Timestamp getRecordTimestamp()The timestamp at which the modifications within were committed in Cloud Spanner.- Specified by:
getRecordTimestampin interfaceChangeStreamEvent
-
getPartitionToken
The unique identifier of the partition that generated this record. -
getCommitTimestamp
public com.google.cloud.Timestamp getCommitTimestamp()The timestamp at which the modifications within were committed in Cloud Spanner. -
getServerTransactionId
The unique transaction id in which the modifications occurred. -
isLastRecordInTransactionInPartition
public boolean isLastRecordInTransactionInPartition()Indicates whether this record is the last emitted for the given transaction in the given partition. -
getRecordSequence
Indicates the order in which this record was put into the change stream in the scope of a partition, commit timestamp and transaction tuple. -
getTableName
The name of the table in which the modifications within this record occurred. -
getRowType
The type of the primary keys and modified columns within this record. -
getMods
The modifications within this record. -
getModType
The type of operation that caused the modifications within this record. -
getValueCaptureType
The capture type of the change stream that generated this record. -
getNumberOfRecordsInTransaction
public long getNumberOfRecordsInTransaction()The total number of data change records for the given transaction. -
getNumberOfPartitionsInTransaction
public long getNumberOfPartitionsInTransaction()The total number of partitions for the given transaction. -
getTransactionTag
Transaction tag associated with this transaction. -
isSystemTransaction
public boolean isSystemTransaction()Indicates whether the transaction is a system transaction. -
getMetadata
The connector execution metadata for this record.- Specified by:
getMetadatain interfaceChangeStreamEvent
-
toString
-