Class ReplicaOfflineMsg
java.lang.Object
org.opends.server.replication.protocol.ReplicationMsg
org.opends.server.replication.protocol.UpdateMsg
org.opends.server.replication.protocol.ReplicaOfflineMsg
- All Implemented Interfaces:
Comparable<UpdateMsg>
Class that define messages sent by a replica (DS) to the replication server (RS) to let the RS know the date at which
a replica went offline.
-
Field Summary
Fields inherited from class ReplicationMsg
MSG_TYPE_DISK_ENCODING -
Constructor Summary
ConstructorsConstructorDescriptionReplicaOfflineMsg(byte[] in) Creates a message by deserializing it from the provided byte array.ReplicaOfflineMsg(Csn offlineCsn) Constructor of a replica offline message providing the offline timestamp in a CSN. -
Method Summary
Modifier and TypeMethodDescription<E extends Exception>
voidaccept(UpdateMsgVisitor<E> visitor) Applies anUpdateMsgVisitorto thisUpdateMsg.byte[]getBytes(short protocolVersion) Serializes the PDU using the provided replication protocol version.intsize()Returns the number of bytes used by this message.Methods inherited from class UpdateMsg
compareTo, equals, getBytes, getCsn, getVersion, hashCode, toJson, toStringMethods inherited from class ReplicationMsg
decodeMsg, isRetryable
-
Constructor Details
-
ReplicaOfflineMsg
Constructor of a replica offline message providing the offline timestamp in a CSN.- Parameters:
offlineCsn- the provided offline CSN
-
ReplicaOfflineMsg
Creates a message by deserializing it from the provided byte array.- Parameters:
in- The provided byte array.- Throws:
DataFormatException- When an error occurs during decoding .
-
-
Method Details
-
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. -
size
-
accept
Description copied from class:UpdateMsgApplies anUpdateMsgVisitorto thisUpdateMsg.- Specified by:
acceptin classUpdateMsg- Type Parameters:
E- The type of the exception thrown by the visitor method if it fails, orNeverThrowsExceptionif the visitor cannot fail.- Parameters:
visitor- The message visitor.- Throws:
E- If the visitor failed.
-