Class ErrorMsg
java.lang.Object
org.opends.server.replication.protocol.ReplicationMsg
org.opends.server.replication.protocol.InitializationMsg
org.opends.server.replication.protocol.ErrorMsg
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.InitializationMsg
destination, senderIdFields inherited from class org.opends.server.replication.protocol.ReplicationMsg
MSG_TYPE_DISK_ENCODING -
Constructor Summary
ConstructorsConstructorDescriptionErrorMsg(ServerId<?> sender, ReplicaId destination, LocalizableMessage details) Creates an ErrorMsg providing the destination server. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getBytes(short protocolVersion) Serializes the PDU using the provided replication protocol version.longGet the creation time of this message.Get the details from this message.getMsgID()Get the msgID from this message.booleanReturns if reinitialization should be retried.toString()Returns a string representation of the message.Methods inherited from class org.opends.server.replication.protocol.InitializationMsg
getDestination, getSenderIDMethods inherited from class org.opends.server.replication.protocol.ReplicationMsg
decodeMsg, isRetryable
-
Constructor Details
-
ErrorMsg
Creates an ErrorMsg providing the destination server.Both a replica and a replication server can send an error message, so
sendermust be able to represent either aReplicaIdor aReplicationServerId.- 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.
-
-
Method Details
-
shouldRetryInitialize
public boolean shouldRetryInitialize()Returns if reinitialization should be retried.Currently reinitialization will be retried when the message is about the source server is not connected to the topology.
- Returns:
- if reinitialization should be retried.
-
getDetails
Get the details from this message.- Returns:
- the details from this message.
-
getMsgID
Get the msgID from this message.- Returns:
- the msgID from this message.
-
getBytes
public byte[] getBytes(short protocolVersion) 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:
protocolVersion- 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
Returns a string representation of the message.- Overrides:
toStringin classInitializationMsg- 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.
-