public class EntryMsg extends RoutableMsg
ALL_SERVERS, destination, senderID, THE_CLOSEST_SERVER, UNKNOWN_SERVER
MSG_TYPE_DISK_ENCODING
Constructor and Description |
---|
EntryMsg(int serverID,
int destination,
byte[] entryBytes,
int msgId)
Creates a new EntryMsg.
|
EntryMsg(int serverID,
int 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.
|
void |
setMsgId(int msgId)
Set the msg id.
|
getDestination, getSenderID, toString
generateMsg
public EntryMsg(int serverID, int destination, byte[] entryBytes, int msgId)
serverID
- The sender of this message.destination
- The destination of this message.entryBytes
- The bytes of the entry.msgId
- Message counter.public EntryMsg(int serverID, int destination, byte[] entryBytes, int startPos, int length, int msgId)
serverID
- 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)
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.Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.