Class MonitorMsg
- java.lang.Object
-
- org.opends.server.replication.protocol.ReplicationMsg
-
- org.opends.server.replication.protocol.MonitorMsg
-
public final class MonitorMsg extends ReplicationMsg
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
Constructors Constructor Description MonitorMsg(int sender, int destination)
Creates a new MonitorMsg.
-
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.int
getDestination()
Get the destination.Map<Integer,ServerState>
getReplicaServerStates()
Returns the map of replica Ids to server states.ServerState
getReplServerDbState()
Get the state of the replication server that sent this message.Map<Integer,ServerState>
getRsServerStates()
Returns the map of replication server Ids to server states.int
getSenderID()
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 isReplicaServer)
Sets the information of an LDAP server.-
Methods inherited from class org.opends.server.replication.protocol.ReplicationMsg
decodeMsg, isRetryable
-
-
-
-
Method Detail
-
setReplServerDbState
public void setReplServerDbState(ServerState state)
Sets the state of the replication server.- Parameters:
state
- The state.
-
setServerState
public void setServerState(int serverId, ServerState state, boolean isReplicaServer)
Sets the information of an LDAP server.- Parameters:
serverId
- The serverID.state
- The server state.isReplicaServer
- Specifies whether the server is a DS or a RS
-
getReplicaServerStates
public Map<Integer,ServerState> getReplicaServerStates()
Returns the map of replica Ids to server states.- Returns:
- The server states of the replicas.
-
getRsServerStates
public Map<Integer,ServerState> 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
public ServerState 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
-
-