public abstract class UpdateMsg extends ReplicationMsg implements Comparable<UpdateMsg>
MSG_TYPE_DISK_ENCODING
Constructor and Description |
---|
UpdateMsg(CSN csn)
Creates a new UpdateMsg with the given informations.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(UpdateMsg msg) |
boolean |
equals(Object obj) |
byte[] |
getBytes()
Returns the encoded representation of this update message using the latest protocol version.
|
abstract byte[] |
getBytes(short protocolVersion)
Serializes the PDU using the provided replication protocol version.
|
CSN |
getCSN()
Get the CSN from the message.
|
short |
getVersion()
Get the version included in the update message.
|
int |
hashCode() |
abstract int |
size()
Return the number of bytes used by this message.
|
String |
toString() |
decodeMsg, isRetryable
public UpdateMsg(CSN csn)
This constructor is only used for testing.
csn
- The CSN associated with the change encoded in this message.public CSN getCSN()
public int compareTo(UpdateMsg msg)
compareTo
in interface Comparable<UpdateMsg>
public short getVersion()
public abstract int size()
public byte[] getBytes()
public abstract byte[] getBytes(short protocolVersion)
ReplicationMsg
getBytes
in class ReplicationMsg
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.Copyright 2010-2022 ForgeRock AS.