Class MonitorMsg
java.lang.Object
org.opends.server.replication.protocol.ReplicationMsg
org.opends.server.replication.protocol.MonitorMsg
The monitor message is sent by a RS to either a DS or a RS.
DS1 or RS1 sends a MonitorRequestMessage to RS2 to requests its monitoring information. When RS2 receives a MonitorRequestMessage from DS1 or RS1, RS2 responds with a MonitorMsg.
-
Field Summary
Fields inherited from class org.opends.server.replication.protocol.ReplicationMsg
COMPACT_MASK, COMPACT_TYPE_ADD, COMPACT_TYPE_DELETE, COMPACT_TYPE_MODIFY, COMPACT_TYPE_MODIFY_DN, COMPACT_TYPE_REPLICA_OFFLINE, MSG_TYPE_DISK_ENCODING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getBytes
(short protocolVersion) Serializes the PDU using the provided replication protocol version.int
Get the destination.Returns the map of replica Ids to server states.Get the state of the replication server that sent this message.Returns the map of replication server Ids to server states.int
Get the server ID of the server that sent this message.void
setReplServerDbState
(ServerState state) Sets the state of the replication server.void
setServerState
(int serverId, ServerState state, boolean isReplica) Sets server state information for a server.Methods inherited from class org.opends.server.replication.protocol.ReplicationMsg
decodeMsg, isRetryable
-
Constructor Details
-
MonitorMsg
public MonitorMsg(int sender, int destination) Creates a new MonitorMsg.- Parameters:
sender
- The sender of this message.destination
- The destination of this message.
-
-
Method Details
-
setReplServerDbState
Sets the state of the replication server.- Parameters:
state
- The state.
-
setServerState
Sets server state information for a server.- Parameters:
serverId
- The serverID.state
- The server state.isReplica
- Specifies whether the server is a DS or a RS
-
getReplicaServerStates
Returns the map of replica Ids to server states.- Returns:
- The server states of the replicas.
-
getRsServerStates
Returns the map of replication server Ids to server states.- Returns:
- The server states of the replication servers.
-
getBytes
public byte[] getBytes(short protocolVersion) Description copied from class:ReplicationMsg
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:
getBytes
in 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
null
if the message isn't supported in that protocol version.
-
getReplServerDbState
Get the state of the replication server that sent this message.- Returns:
- The state.
-
getDestination
public int getDestination()Get the destination.- Returns:
- the destination
-
getSenderID
public int getSenderID()Get the server ID of the server that sent this message.- Returns:
- the server id
-