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 |
generateMsg(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.
|
public static final byte MSG_TYPE_DISK_ENCODING
protected ReplicationMsg()
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 static ReplicationMsg generateMsg(byte[] buffer, short protocolVersion) throws DataFormatException, NotSupportedOldVersionPDUException
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-2017 ForgeRock AS. All Rights Reserved.