public abstract class BaseProtocol extends BinaryProtocol
Protocol| Modifier and Type | Class and Description |
|---|---|
class |
BaseProtocol.Ack
Message of an ack op
|
class |
BaseProtocol.AlternateMatchpoint |
class |
BaseProtocol.Commit
Message of a commit op
|
class |
BaseProtocol.Entry
A message containing a log entry in the replication stream.
|
class |
BaseProtocol.EntryNotFound
Response when the EntryRequest asks for a VLSN that is below the VLSN
range covered by the Feeder.
|
class |
BaseProtocol.EntryRequest
A replica node asks a feeder for the log entry at this VLSN.
|
static class |
BaseProtocol.EntryRequestType
Type of entry request sent to feeder
RV: VLSN requested by client
LOW: low end of available VLSN range in vlsn index
HIGH: high end of available VLSN range in vlsn index
The DEFAULT mode is used by existing replication stream consumer e.g.
|
class |
BaseProtocol.GroupAck |
protected class |
BaseProtocol.HandshakeMessage
Base class for all protocol handshake messages.
|
class |
BaseProtocol.Heartbeat |
class |
BaseProtocol.HeartbeatResponse |
protected class |
BaseProtocol.ProtocolVersion
Version broadcasts the sending node's protocol version.
|
class |
BaseProtocol.RestoreRequest
Request from the replica to the feeder for sufficient information to
start a network restore.
|
class |
BaseProtocol.RestoreResponse
Response when the replica needs information to instigate a network
restore.
|
class |
BaseProtocol.ShutdownRequest
Message used to shutdown a node
|
class |
BaseProtocol.ShutdownResponse
Message in response to a shutdown request.
|
class |
BaseProtocol.StartStream
StartStream indicates that the replica would like the feeder to start
the replication stream at the proposed vlsn.
|
protected class |
BaseProtocol.VLSNMessage
Base class for messages which contain only a VLSN
|
BinaryProtocol.ClientVersion, BinaryProtocol.IncompatibleVersion, BinaryProtocol.Message, BinaryProtocol.MessageOp, BinaryProtocol.ProtocolError, BinaryProtocol.ProtocolException, BinaryProtocol.RejectMessage, BinaryProtocol.ServerVersion, BinaryProtocol.SimpleMessageCLIENT_VERSION, codeVersion, configuredVersion, envImpl, formatter, header, INCOMPATIBLE_VERSION, logger, MESSAGE_HEADER_SIZE, nameIdPair, nBytesRead, nBytesWritten, nEntriesWrittenOldVersion, nMessageBatches, nMessagesBatched, nMessagesRead, nMessagesWritten, nReadNanos, nWriteNanos, PROTOCOL_ERROR, SERVER_VERSION, stats| Modifier | Constructor and Description |
|---|---|
protected |
BaseProtocol(RepImpl repImpl,
NameIdPair nameIdPair,
int protocolVersion,
int maxProtocolVersion,
int streamLogVersion,
BinaryProtocol.MessageOp[] protocolOps)
Returns a BaseProtocol object configured that implements the specified
(supported) protocol version, with enforced message operation
code validity check.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getFixLogVersion12Entries()
Returns whether log entries need their log versions fixed to work around
[#25222].
|
int |
getStreamLogVersion() |
void |
setFixLogVersion12Entries(boolean value)
Sets whether log entries need their log versions fixed to work around
[#25222].
|
void |
setStreamLogVersion(int streamLogVersion)
Invoked in cases where the stream log version is not known at the time
the protocol object is created and stream log version negotiations are
required to determine the version that will be used for log records sent
over the HA stream.
|
protected void |
writeOutputWireRecord(OutputWireRecord record,
ByteBuffer messageBuffer)
Write an entry output wire record to the message buffer using the write
log version format and increment nEntriesWrittenOldVersion if the entry
format was changed.
|
bufferWrite, flushBufferedWrites, getPredefinedMessageCount, getStats, getString, getVersion, initializeMessageOps, messageCount, putString, read, read, resetStats, stringSize, write, writepublic static final int MAX_VERSION
public static final int VERSION_9
public static final JEVersion VERSION_9_JE_VERSION
public static final int VERSION_8
public static final JEVersion VERSION_8_JE_VERSION
public static final int VERSION_7
public static final JEVersion VERSION_7_JE_VERSION
public static final int VERSION_6
public static final JEVersion VERSION_6_JE_VERSION
public static final int VERSION_5
public static final JEVersion VERSION_5_JE_VERSION
public static final JEVersion VERSION_4_JE_VERSION
public static final JEVersion VERSION_3_JE_VERSION
protected static final short MIN_MESSAGE_OP_CODE_IN_SUBCLASS
protected static final short MAX_MESSAGE_OP_CODE_IN_SUBCLASS
public static final BinaryProtocol.MessageOp ENTRY
public static final BinaryProtocol.MessageOp START_STREAM
public static final BinaryProtocol.MessageOp HEARTBEAT
public static final BinaryProtocol.MessageOp HEARTBEAT_RESPONSE
public static final BinaryProtocol.MessageOp COMMIT
public static final BinaryProtocol.MessageOp ACK
public static final BinaryProtocol.MessageOp ENTRY_REQUEST
public static final BinaryProtocol.MessageOp ENTRY_NOTFOUND
public static final BinaryProtocol.MessageOp ALT_MATCHPOINT
public static final BinaryProtocol.MessageOp RESTORE_REQUEST
public static final BinaryProtocol.MessageOp RESTORE_RESPONSE
public static final BinaryProtocol.MessageOp SHUTDOWN_REQUEST
public static final BinaryProtocol.MessageOp SHUTDOWN_RESPONSE
public static final BinaryProtocol.MessageOp GROUP_ACK
protected int streamLogVersion
protected final LongStat nAckMessages
protected final LongStat nGroupAckMessages
protected final LongStat nGroupedAcks
protected final LongMaxStat nMaxGroupedAcks
protected final RepImpl repImpl
protected BaseProtocol(RepImpl repImpl, NameIdPair nameIdPair, int protocolVersion, int maxProtocolVersion, int streamLogVersion, BinaryProtocol.MessageOp[] protocolOps)
repImpl - the node using the protocolnameIdPair - name-id pair of the node using the protocolprotocolVersion - the version of the protocol that must be
implemented by this objectmaxProtocolVersion - the highest supported protocol version, which
may be lower than the code version, for testing purposesstreamLogVersion - the log version of the format used to write log
entriesprotocolOps - the message operations that make up this protocolpublic int getStreamLogVersion()
public void setStreamLogVersion(int streamLogVersion)
streamLogVersion - the maximum log version associated with stream
recordspublic boolean getFixLogVersion12Entries()
public void setFixLogVersion12Entries(boolean value)
protected void writeOutputWireRecord(OutputWireRecord record, ByteBuffer messageBuffer)
Copyright © 2024. All rights reserved.