Class ErrorMsg
- java.lang.Object
-
- org.opends.server.replication.protocol.ReplicationMsg
-
- org.opends.server.replication.protocol.RoutableMsg
-
- org.opends.server.replication.protocol.ErrorMsg
-
public class ErrorMsg extends RoutableMsg
This message is part of the replication protocol. This message is sent by a server or a replication server when an error is detected in the context of a total update.
-
-
Field Summary
-
Fields inherited from class org.opends.server.replication.protocol.RoutableMsg
ALL_SERVERS, destination, senderID, THE_CLOSEST_SERVER, UNKNOWN_SERVER
-
Fields inherited from class org.opends.server.replication.protocol.ReplicationMsg
MSG_TYPE_DISK_ENCODING
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytes(short version)Serializes the PDU using the provided replication protocol version.longgetCreationTime()Get the creation time of this message.org.forgerock.i18n.LocalizableMessagegetDetails()Get the details from this message.StringgetMsgID()Get the msgID from this message.voidsetCreationTime(long creationTime)Get the creation time of this message.StringtoString()Returns a string representation of the message.-
Methods inherited from class org.opends.server.replication.protocol.RoutableMsg
getDestination, getSenderID
-
Methods inherited from class org.opends.server.replication.protocol.ReplicationMsg
generateMsg, isEncodableFor
-
-
-
-
Constructor Detail
-
ErrorMsg
public ErrorMsg(int sender, int destination, org.forgerock.i18n.LocalizableMessage details)Creates an ErrorMsg providing the destination server.- Parameters:
sender- The server ID of the server that send this message.destination- The destination server or servers of this message.details- The message containing the details of the error.
-
ErrorMsg
public ErrorMsg(int destination, org.forgerock.i18n.LocalizableMessage details)Creates an ErrorMsg.- Parameters:
destination- replication server iddetails- details of the error
-
-
Method Detail
-
getDetails
public org.forgerock.i18n.LocalizableMessage getDetails()
Get the details from this message.- Returns:
- the details from this message.
-
getMsgID
public String getMsgID()
Get the msgID from this message.- Returns:
- the msgID from this message.
-
getBytes
public byte[] getBytes(short version)
Serializes 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.
-
toString
public String toString()
Returns a string representation of the message.- Overrides:
toStringin classRoutableMsg- Returns:
- the string representation of this message.
-
getCreationTime
public long getCreationTime()
Get the creation time of this message. When several attempts of initialization are done sequentially, it helps sorting the good ones, from the ones that relate to ended initialization when they are received.- Returns:
- the creation time of this message.
-
setCreationTime
public void setCreationTime(long creationTime)
Get the creation time of this message.- Parameters:
creationTime- the creation time of this message.
-
-