public abstract class ReplicationMsg extends Object
Modifier and Type | Field and Description |
---|---|
static byte |
MSG_TYPE_DISK_ENCODING
Reserved type for uses other than protocol messages.
|
Modifier | Constructor and Description |
---|---|
protected |
ReplicationMsg()
Protected constructor.
|
Modifier and Type | Method and Description |
---|---|
static ReplicationMsg |
decodeMsg(ReplicationContext replicationContext,
byte[] buffer,
short protocolVersion)
Generates a ReplicationMsg from its encoded form.
|
abstract byte[] |
getBytes(short protocolVersion)
Serializes the PDU using the provided replication protocol version.
|
boolean |
isRetryable()
Returns if in case of I/O error we should try to send this message again.
|
public static final byte MSG_TYPE_DISK_ENCODING
public abstract byte[] getBytes(short protocolVersion)
protocolVersion
- The protocol version to use for serialization. The version should normally be older than the current
one.null
if the message isn't supported in that protocol version.public boolean isRetryable()
public static ReplicationMsg decodeMsg(ReplicationContext replicationContext, byte[] buffer, short protocolVersion) throws DataFormatException, NotSupportedOldVersionPDUException
replicationContext
- The replication context.buffer
- The encode form of the ReplicationMsg.protocolVersion
- The version to use to decode the msg.DataFormatException
- If the encoded form was not a valid msg.NotSupportedOldVersionPDUException
- If the PDU is part of an old protocol version and we do not support it.Copyright 2010-2022 ForgeRock AS.