Class MonitorMsg
- java.lang.Object
-
- org.opends.server.replication.protocol.ReplicationMsg
-
- org.opends.server.replication.protocol.MonitorMsg
-
public class MonitorMsg extends ReplicationMsg
This message is part of the replication protocol. RS1 sends a MonitorRequestMessage to RS2 to requests its monitoring information. When RS2 receives a MonitorRequestMessage from RS1, RS2 responds with a MonitorMsg.
-
-
Field Summary
-
Fields inherited from class org.opends.server.replication.protocol.ReplicationMsg
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.intgetDestination()Get the destination.longgetLDAPApproxFirstMissingDate(int serverId)Get the approximation of the date of the older missing change for the LDAP Server with the provided server Id.ServerStategetLDAPServerState(int serverId)Get the server state for the LDAP server with the provided serverId.ServerStategetReplServerDbState()Get the state of the replication server that sent this message.longgetRSApproxFirstMissingDate(int serverId)Get the approximation of the date of the older missing change for the RS Server with the provided server Id.ServerStategetRSServerState(int serverId)Get the server state for the RS server with the provided serverId.intgetSenderID()Get the server ID of the server that sent this message.Iterator<Integer>ldapIterator()Returns an iterator on the serverId of the connected LDAP servers.Iterator<Integer>rsIterator()Returns an iterator on the serverId of the connected RS servers.voidsetReplServerDbState(ServerState state)Sets the state of the replication server.voidsetServerState(int serverId, ServerState state, long approxFirstMissingDate, boolean isLDAPServer)Sets the information of an LDAP server.StringtoString()-
Methods inherited from class org.opends.server.replication.protocol.ReplicationMsg
generateMsg, isEncodableFor
-
-
-
-
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, long approxFirstMissingDate, boolean isLDAPServer)Sets the information of an LDAP server.- Parameters:
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 RS
-
getLDAPServerState
public ServerState getLDAPServerState(int serverId)
Get the server state for the LDAP server with the provided serverId.- Parameters:
serverId- The provided serverId.- Returns:
- The state.
-
getRSServerState
public ServerState getRSServerState(int serverId)
Get the server state for the RS server with the provided serverId.- Parameters:
serverId- The provided serverId.- Returns:
- The state.
-
getLDAPApproxFirstMissingDate
public long getLDAPApproxFirstMissingDate(int serverId)
Get the approximation of the date of the older missing change for the LDAP Server with the provided server Id.- Parameters:
serverId- The provided serverId.- Returns:
- The approximated state.
-
getRSApproxFirstMissingDate
public long getRSApproxFirstMissingDate(int serverId)
Get the approximation of the date of the older missing change for the RS Server with the provided server Id.- Parameters:
serverId- The provided serverId.- Returns:
- The approximated state.
-
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.- 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.
-
getReplServerDbState
public ServerState getReplServerDbState()
Get the state of the replication server that sent this message.- Returns:
- The state.
-
ldapIterator
public Iterator<Integer> ldapIterator()
Returns an iterator on the serverId of the connected LDAP servers.- Returns:
- The iterator.
-
rsIterator
public Iterator<Integer> rsIterator()
Returns an iterator on the serverId of the connected RS servers.- Returns:
- The iterator.
-
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
-
-