public abstract class AbstractMessageDecoder extends Object implements MessageDecoder
MessageDecoder that all decoders should inherit from.| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER |
| Constructor and Description |
|---|
AbstractMessageDecoder() |
| 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,
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitoptionsWithMetadata, optionsWithoutMetadata, setContainsMetadatapublic 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, Long lastReceivedLsn, Long startLsn, boolean skipFirstFlushRecord)
MessageDecodershouldMessageBeSkipped in interface MessageDecoderbuffer - 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 © 2020 JBoss by Red Hat. All rights reserved.