Class TopologyMsg
- java.lang.Object
-
- org.opends.server.replication.protocol.ReplicationMsg
-
- org.opends.server.replication.protocol.TopologyMsg
-
public class TopologyMsg extends ReplicationMsg
This class defines a message that is sent: - By a RS to the other RSs in the topology, containing: - the DSs directly connected to the RS in the DS infos - only this RS in the RS infos - By a RS to his connected DSs, containing every DSs and RSs he knows. In that case the message contains: - every DSs the RS knows except the destinator DS in the DS infos - every connected RSs (including the sending RS) in the RS infos Exchanging these messages allows to have each RS or DS take appropriate decisions according to the current topology: - a RS can route a message to a DS - a DS can decide towards which peer DS send referrals ...
-
-
Field Summary
-
Fields inherited from class org.opends.server.replication.protocol.ReplicationMsg
MSG_TYPE_DISK_ENCODING
-
-
Constructor Summary
Constructors Constructor Description TopologyMsg(Collection<DSInfo> dsInfos, List<RSInfo> rsInfos)Creates a new message of the currently connected servers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytes(short version)Serializes the PDU using the provided replication protocol version.Map<Integer,DSInfo>getReplicaInfos()Get the DS infos.List<RSInfo>getRsInfos()Get the RS infos.StringtoString()-
Methods inherited from class org.opends.server.replication.protocol.ReplicationMsg
generateMsg, isEncodableFor
-
-
-
-
Constructor Detail
-
TopologyMsg
public TopologyMsg(Collection<DSInfo> dsInfos, List<RSInfo> rsInfos)
Creates a new message of the currently connected servers.- Parameters:
dsInfos- The collection of currently connected DS servers ID.rsInfos- The list of currently connected RS servers ID.
-
-
Method Detail
-
getBytes
public byte[] getBytes(short version)
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:
version- 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.
-
getReplicaInfos
public Map<Integer,DSInfo> getReplicaInfos()
Get the DS infos.- Returns:
- The DS infos
-
-