public class MonitorMsg extends ReplicationMsg
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.
MSG_TYPE_DISK_ENCODING
Constructor and Description |
---|
MonitorMsg(int sender,
int destination)
Creates a new MonitorMsg.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes(short protocolVersion)
Serializes the PDU using the provided replication protocol version.
|
int |
getDestination()
Get the destination.
|
long |
getLDAPApproxFirstMissingDate(int replicaId)
Get the approximation of the date of the older missing change for a replica.
|
ServerState |
getLDAPServerState(int replicaId)
Get the server state for the LDAP server with the provided replica id.
|
ServerState |
getReplServerDbState()
Get the state of the replication server that sent this message.
|
long |
getRSApproxFirstMissingDate(int replicationServerId)
Get the approximation of the date of the older missing change for an RS Server.
|
ServerState |
getRSServerState(int replicationServerId)
Get the server state for the RS server with the provided replication server id.
|
int |
getSenderID()
Get the server ID of the server that sent this message.
|
Iterable<Integer> |
replicaIds()
Returns an iterable on the replica ids of the connected LDAP servers.
|
Iterable<Integer> |
replicationServerIds()
Returns an iterable on the replication server ids of the connected RS servers.
|
void |
setReplServerDbState(ServerState state)
Sets the state of the replication server.
|
void |
setServerState(int serverId,
ServerState state,
long approxFirstMissingDate,
boolean isLDAPServer)
Sets the information of an LDAP server.
|
String |
toString() |
decodeMsg, isRetryable
public MonitorMsg(int sender, int destination)
sender
- The sender of this message.destination
- The destination of this message.public void setReplServerDbState(ServerState state)
state
- The state.public void setServerState(int serverId, ServerState state, long approxFirstMissingDate, boolean isLDAPServer)
serverId
- The serverID.state
- The server state.approxFirstMissingDate
- The approximation of the date of the older missing change. null when none.isLDAPServer
- Specifies whether the server is a DS or a RSpublic ServerState getLDAPServerState(int replicaId)
replicaId
- The provided replica id.public ServerState getRSServerState(int replicationServerId)
replicationServerId
- The provided replication server id.public long getLDAPApproxFirstMissingDate(int replicaId)
replicaId
- The provided replica id.public long getRSApproxFirstMissingDate(int replicationServerId)
replicationServerId
- The provided replication server id.public byte[] getBytes(short protocolVersion)
ReplicationMsg
getBytes
in class ReplicationMsg
protocolVersion
- The protocol version to use for serialization. The version should normally be older than the current
one.null
if the message isn't supported in that protocol version.public ServerState getReplServerDbState()
public Iterable<Integer> replicaIds()
public Iterable<Integer> replicationServerIds()
public int getDestination()
public int getSenderID()
Copyright 2010-2022 ForgeRock AS.