public interface MessageDecoder
| Modifier and Type | Method and Description |
|---|---|
org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder |
optionsWithMetadata(org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder builder)
Allows MessageDecoder to configure options with which the replication stream is started.
|
org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder |
optionsWithoutMetadata(org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder builder)
Allows MessageDecoder to configure options with which the replication stream is started.
|
void |
processMessage(ByteBuffer buffer,
ReplicationStream.ReplicationMessageProcessor processor,
TypeRegistry typeRegistry)
Process a message upon arrival from logical decoder
|
default void |
setContainsMetadata(boolean flag)
Signals to this decoder whether messages contain type metadata or not.
|
boolean |
shouldMessageBeSkipped(ByteBuffer buffer,
Long lastReceivedLsn,
Long startLsn,
boolean skipFirstFlushRecord)
A callback into the decoder allowing it to decide whether the supplied message should be processed
by the decoder or whether it can be skipped.
|
void processMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException
buffer - - binary representation of replication messageprocessor - - message processing on arrivaltypeRegistry - - registry with known typesSQLExceptionInterruptedExceptionorg.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder optionsWithMetadata(org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder builder)
builder - org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder optionsWithoutMetadata(org.postgresql.replication.fluent.logical.ChainedLogicalStreamBuilder builder)
builder - default void setContainsMetadata(boolean flag)
boolean shouldMessageBeSkipped(ByteBuffer buffer, Long lastReceivedLsn, Long startLsn, boolean skipFirstFlushRecord)
buffer - the replication stream bufferlastReceivedLsn - the last LSN reported by the replication streamstartLsn - the starting LSN reported by the streaming producerskipFirstFlushRecord - whether first flush record should be skippedtrue if the incoming message should be skipped, false otherwiseCopyright © 2019 JBoss by Red Hat. All rights reserved.