Class ChangeStatusMsg
- java.lang.Object
-
- org.opends.server.replication.protocol.ReplicationMsg
-
- org.opends.server.replication.protocol.ChangeStatusMsg
-
public class ChangeStatusMsg extends ReplicationMsg
This message is used by the DS to tell the RS he is changing his status (new status field used), or by the RS to tell the DS he must change his status (requested status field used).
-
-
Field Summary
-
Fields inherited from class org.opends.server.replication.protocol.ReplicationMsg
MSG_TYPE_DISK_ENCODING
-
-
Constructor Summary
Constructors Constructor Description ChangeStatusMsg(ServerStatus requestedStatus, ServerStatus newStatus)Create a new ChangeStatusMsg.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytes(short protocolVersion)Serializes the PDU using the provided replication protocol version.ServerStatusgetNewStatus()Get the requested status.ServerStatusgetRequestedStatus()Get the requested status.StringtoString()-
Methods inherited from class org.opends.server.replication.protocol.ReplicationMsg
generateMsg, isEncodableFor
-
-
-
-
Constructor Detail
-
ChangeStatusMsg
public ChangeStatusMsg(ServerStatus requestedStatus, ServerStatus newStatus)
Create a new ChangeStatusMsg.- Parameters:
requestedStatus- The requested statusnewStatus- The new status
-
-
Method Detail
-
getBytes
public byte[] getBytes(short protocolVersion)
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:
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.
-
getRequestedStatus
public ServerStatus getRequestedStatus()
Get the requested status.- Returns:
- The requested status
-
getNewStatus
public ServerStatus getNewStatus()
Get the requested status.- Returns:
- The new status
-
-