public class EntryMsg extends RoutableMsg
destination, senderId
MSG_TYPE_DISK_ENCODING
Constructor and Description |
---|
EntryMsg(ReplicaId sender,
ReplicaId destination,
byte[] entryBytes,
int msgId)
Creates a new EntryMsg.
|
EntryMsg(ReplicaId sender,
ReplicaId destination,
byte[] entryBytes,
int startPos,
int length,
int msgId)
Creates a new EntryMsg.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes(short version)
Serializes the PDU using the provided replication protocol version.
|
byte[] |
getEntryBytes()
Returns the entry bytes.
|
int |
getMsgId()
Return the msg id.
|
ReplicaId |
getSenderID()
Get the server ID of the server that sent this message.
|
boolean |
isRetryable()
Returns if in case of I/O error we should try to send this message again.
|
void |
setMsgId(int msgId)
Set the msg id.
|
getDestination, toString
decodeMsg
public EntryMsg(ReplicaId sender, ReplicaId destination, byte[] entryBytes, int msgId)
sender
- The sender of this message.destination
- The destination of this message.entryBytes
- The bytes of the entry.msgId
- Message counter.public EntryMsg(ReplicaId sender, ReplicaId destination, byte[] entryBytes, int startPos, int length, int msgId)
sender
- The sender of this message.destination
- The destination of this message.entryBytes
- The bytes of the entry.startPos
- The starting Position in the array.length
- Number of array elements to be copied.msgId
- Message counter.public byte[] getEntryBytes()
public byte[] getBytes(short version)
ReplicationMsg
getBytes
in class ReplicationMsg
version
- 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 int getMsgId()
public void setMsgId(int msgId)
msgId
- The msg id.public ReplicaId getSenderID()
RoutableMsg
getSenderID
in class RoutableMsg
public boolean isRetryable()
ReplicationMsg
isRetryable
in class ReplicationMsg
Copyright 2010-2022 ForgeRock AS.