public abstract class AbstractMessageDecoder extends Object implements MessageDecoder
MessageDecoder that all decoders should inherit from.| Modifier and Type | Field and Description |
|---|---|
private boolean |
filterBasedOnLsn |
private static org.slf4j.Logger |
LOGGER |
| Constructor and Description |
|---|
AbstractMessageDecoder(MessageDecoderConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
processMessage(ByteBuffer buffer,
ReplicationStream.ReplicationMessageProcessor processor,
TypeRegistry typeRegistry)
Process a message upon arrival from logical decoder
|
protected abstract void |
processNotEmptyMessage(ByteBuffer buffer,
ReplicationStream.ReplicationMessageProcessor processor,
TypeRegistry typeRegistry) |
boolean |
shouldMessageBeSkipped(ByteBuffer buffer,
Lsn lastReceivedLsn,
Lsn startLsn,
WalPositionLocator walPosition)
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitoptionsWithMetadata, optionsWithoutMetadata, setContainsMetadataprivate static final org.slf4j.Logger LOGGER
private final boolean filterBasedOnLsn
public AbstractMessageDecoder(MessageDecoderConfig config)
public void processMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException
MessageDecoderprocessMessage in interface MessageDecoderbuffer - - binary representation of replication messageprocessor - - message processing on arrivaltypeRegistry - - registry with known typesSQLExceptionInterruptedExceptionprotected abstract void processNotEmptyMessage(ByteBuffer buffer, ReplicationStream.ReplicationMessageProcessor processor, TypeRegistry typeRegistry) throws SQLException, InterruptedException
SQLExceptionInterruptedExceptionpublic boolean shouldMessageBeSkipped(ByteBuffer buffer, Lsn lastReceivedLsn, Lsn startLsn, WalPositionLocator walPosition)
MessageDecodershouldMessageBeSkipped in interface MessageDecoderbuffer - the replication stream bufferlastReceivedLsn - the last LSN reported by the replication streamstartLsn - the starting LSN reported by the streaming producerwalPosition - wal position from which the streaming should resumetrue if the incoming message should be skipped, false otherwiseCopyright © 2021 JBoss by Red Hat. All rights reserved.