Class LogicalDecodingMessage
- java.lang.Object
-
- io.debezium.connector.postgresql.connection.LogicalDecodingMessage
-
- All Implemented Interfaces:
ReplicationMessage
public class LogicalDecodingMessage extends Object implements ReplicationMessage
Replication message instance representing a generic logical decoding message- Author:
- Lairen Hightower
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.debezium.connector.postgresql.connection.ReplicationMessage
ReplicationMessage.Column, ReplicationMessage.ColumnTypeMetadata, ReplicationMessage.ColumnValue<T>, ReplicationMessage.NoopMessage, ReplicationMessage.Operation
-
-
Field Summary
Fields Modifier and Type Field Description private InstantcommitTimeprivate byte[]contentprivate booleanisTransactionalprivate ReplicationMessage.Operationoperationprivate Stringprefixprivate LongtransactionId
-
Constructor Summary
Constructors Constructor Description LogicalDecodingMessage(ReplicationMessage.Operation op, Instant commitTimestamp, Long transactionId, boolean isTransactional, String prefix, byte[] content)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstantgetCommitTime()byte[]getContent()List<ReplicationMessage.Column>getNewTupleList()List<ReplicationMessage.Column>getOldTupleList()ReplicationMessage.OperationgetOperation()StringgetPrefix()StringgetTable()OptionalLonggetTransactionId()booleanhasTypeMetadata()booleanisLastEventForLsn()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.debezium.connector.postgresql.connection.ReplicationMessage
isTransactionalMessage, shouldSchemaBeSynchronized
-
-
-
-
Field Detail
-
operation
private final ReplicationMessage.Operation operation
-
commitTime
private final Instant commitTime
-
transactionId
private final Long transactionId
-
isTransactional
private final boolean isTransactional
-
prefix
private final String prefix
-
content
private final byte[] content
-
-
Constructor Detail
-
LogicalDecodingMessage
public LogicalDecodingMessage(ReplicationMessage.Operation op, Instant commitTimestamp, Long transactionId, boolean isTransactional, String prefix, byte[] content)
-
-
Method Detail
-
isLastEventForLsn
public boolean isLastEventForLsn()
- Specified by:
isLastEventForLsnin interfaceReplicationMessage- Returns:
- true if this is the last message in the batch of messages with same LSN
-
getOperation
public ReplicationMessage.Operation getOperation()
- Specified by:
getOperationin interfaceReplicationMessage- Returns:
- A data operation executed
-
getCommitTime
public Instant getCommitTime()
- Specified by:
getCommitTimein interfaceReplicationMessage- Returns:
- Transaction commit time for this change
-
getTransactionId
public OptionalLong getTransactionId()
- Specified by:
getTransactionIdin interfaceReplicationMessage- Returns:
- An id of transaction to which this change belongs; will not be present for non-transactional logical decoding messages for instance
-
getTable
public String getTable()
- Specified by:
getTablein interfaceReplicationMessage- Returns:
- Table changed
-
getOldTupleList
public List<ReplicationMessage.Column> getOldTupleList()
- Specified by:
getOldTupleListin interfaceReplicationMessage- Returns:
- Set of original values of table columns, null for INSERT
-
getNewTupleList
public List<ReplicationMessage.Column> getNewTupleList()
- Specified by:
getNewTupleListin interfaceReplicationMessage- Returns:
- Set of new values of table columns, null for DELETE
-
hasTypeMetadata
public boolean hasTypeMetadata()
- Specified by:
hasTypeMetadatain interfaceReplicationMessage- Returns:
- true if type metadata are passed as a part of message
-
getPrefix
public String getPrefix()
-
getContent
public byte[] getContent()
-
-