Class EntryMsg
java.lang.Object
org.opends.server.replication.protocol.ReplicationMsg
org.opends.server.replication.protocol.InitializationMsg
org.opends.server.replication.protocol.EntryMsg
This message is part of the replication protocol. This message is sent by a server to one or several other servers
and contain one entry to be sent over the protocol in the context of an import/export over the protocol.
-
Field Summary
Fields inherited from class org.opends.server.replication.protocol.InitializationMsg
destination, senderIdFields inherited from class org.opends.server.replication.protocol.ReplicationMsg
MSG_TYPE_DISK_ENCODING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getBytes(short version) Serializes the PDU using the provided replication protocol version.byte[]Returns the entry bytes.intgetMsgId()Return the msg id.Get the server ID of the server that sent this message.booleanReturns if in case of I/O error we should try to send this message again.Methods inherited from class org.opends.server.replication.protocol.InitializationMsg
getDestination, toStringMethods inherited from class org.opends.server.replication.protocol.ReplicationMsg
decodeMsg
-
Constructor Details
-
EntryMsg
Creates a new EntryMsg.- Parameters:
sender- The sender of this message.destination- The destination of this message.entryBytes- The bytes of the entry.msgId- Message counter.
-
EntryMsg
public EntryMsg(ReplicaId sender, ReplicaId destination, byte[] entryBytes, int startPos, int length, int msgId) Creates a new EntryMsg.- Parameters:
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.
-
-
Method Details
-
getEntryBytes
public byte[] getEntryBytes()Returns the entry bytes.- Returns:
- The entry bytes.
-
getBytes
public byte[] getBytes(short version) Description copied from class:ReplicationMsgSerializes the PDU using the provided replication protocol version. WARNING: should be overwritten by a PDU (sub class) we want to support older protocol version serialization for.- Specified by:
getBytesin classReplicationMsg- Parameters:
version- The protocol version to use for serialization. The version should normally be older than the current one.- Returns:
- The encoded PDU, or
nullif the message isn't supported in that protocol version.
-
getMsgId
public int getMsgId()Return the msg id.- Returns:
- The msg id.
-
getSenderID
Description copied from class:InitializationMsgGet the server ID of the server that sent this message.- Overrides:
getSenderIDin classInitializationMsg- Returns:
- the server id
-
isRetryable
public boolean isRetryable()Description copied from class:ReplicationMsgReturns if in case of I/O error we should try to send this message again.- Overrides:
isRetryablein classReplicationMsg- Returns:
- if in case of I/O error we should try to send this message again
-