class PgProtoReplicationMessage extends Object implements ReplicationMessage
ReplicationMessage.Column, ReplicationMessage.ColumnTypeMetadata, ReplicationMessage.ColumnValue<T>, ReplicationMessage.Operation| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER |
private PgProto.RowMessage |
rawMessage |
private TypeRegistry |
typeRegistry |
| Constructor and Description |
|---|
PgProtoReplicationMessage(PgProto.RowMessage rawMessage,
TypeRegistry typeRegistry) |
| Modifier and Type | Method and Description |
|---|---|
private Object |
getArray(PgProto.DatumMessage datumMessage,
PostgresStreamingChangeEventSource.PgConnectionSupplier connection,
int columnType) |
Instant |
getCommitTime() |
List<ReplicationMessage.Column> |
getNewTupleList() |
List<ReplicationMessage.Column> |
getOldTupleList() |
ReplicationMessage.Operation |
getOperation() |
String |
getTable() |
long |
getTransactionId() |
Object |
getValue(PgProto.DatumMessage datumMessage,
PostgresStreamingChangeEventSource.PgConnectionSupplier connection,
boolean includeUnknownDatatypes)
Converts the Protobuf value for a
plugin message to
a Java value based on the type of the column from the message. |
boolean |
hasTypeMetadata() |
boolean |
isLastEventForLsn() |
private List<ReplicationMessage.Column> |
transform(List<PgProto.DatumMessage> messageList,
List<PgProto.TypeInfo> typeInfoList) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitshouldSchemaBeSynchronizedprivate static final org.slf4j.Logger LOGGER
private final PgProto.RowMessage rawMessage
private final TypeRegistry typeRegistry
public PgProtoReplicationMessage(PgProto.RowMessage rawMessage, TypeRegistry typeRegistry)
public ReplicationMessage.Operation getOperation()
getOperation in interface ReplicationMessagepublic Instant getCommitTime()
getCommitTime in interface ReplicationMessagepublic long getTransactionId()
getTransactionId in interface ReplicationMessagepublic String getTable()
getTable in interface ReplicationMessagepublic List<ReplicationMessage.Column> getOldTupleList()
getOldTupleList in interface ReplicationMessagepublic List<ReplicationMessage.Column> getNewTupleList()
getNewTupleList in interface ReplicationMessagepublic boolean hasTypeMetadata()
hasTypeMetadata in interface ReplicationMessageprivate List<ReplicationMessage.Column> transform(List<PgProto.DatumMessage> messageList, List<PgProto.TypeInfo> typeInfoList)
public boolean isLastEventForLsn()
isLastEventForLsn in interface ReplicationMessagepublic Object getValue(PgProto.DatumMessage datumMessage, PostgresStreamingChangeEventSource.PgConnectionSupplier connection, boolean includeUnknownDatatypes)
plugin message to
a Java value based on the type of the column from the message. This value will be converted later on if necessary by the
PostgresValueConverter.converter(Column, Field) instance to match whatever the Connect schema type expects.
Note that the logic here is tightly coupled (i.e. dependent) on the Postgres plugin logic which writes the actual
Protobuf messages.a - supplier to get a connection to Postgres instance for array handlingprivate Object getArray(PgProto.DatumMessage datumMessage, PostgresStreamingChangeEventSource.PgConnectionSupplier connection, int columnType)
Copyright © 2019 JBoss by Red Hat. All rights reserved.