Class TopologyMsg
- java.lang.Object
-
- org.opends.server.replication.protocol.ReplicationMsg
-
- org.opends.server.replication.protocol.TopologyMsg
-
public final class TopologyMsg extends ReplicationMsg
This class defines a message that is sent:- By a RS to the other RSs in the topology, containing:
- every DSs directly connected to the RS in the DS infos
- every connected RSs (including the sending RS) in the RS infos
- By a RS to his connected DSs, containing.
- every DSs the RS knows, except the destinator DS in the DS infos
- every connected RSs (including the sending RS) in the RS infos
- a RS can route a message to a DS
- a DS can decide towards which peer DS send referrals ...
Its network encoding changed in V11 by using a simplified format, in ASN.1. The new definition is as follows:
TopologyMsg ::= [APPLICATION 1] CHOICE { v11 PayloadV11 } PayloadV11 ::= SEQUENCE { dsInfo ::= SET OF SEQUENCE { protocolVersion INTEGER replicaId PrintableString hostPort PrintableString groupId PrintableString replicationServerId PrintableString generationId INTEGER status INTEGER processId ProcessID refUrls ::= SET OF { url PrintableString } eclIncludes :: SET OF { attributeName PrintableString } eclIncludesForDeletes ::= SET OF { attributeName PrintableString } adminHostPorts HostPorts ldapHostPorts ::= SEQUENCE { connSecurity INTEGER hostPorts HostPorts } } rsInfo ::= SET OF SEQUENCE { replicationServerId PrintableString hostPort PrintableString groupId PrintableString generationId INTEGER weight INTEGER processId ProcessID adminHostPorts HostPorts } } ProcessID ::= SEQUENCE { mostSigBits INTEGER leastSigBits INTEGER } HostPorts ::= SET OF { host PrintableString port INTEGER }
- By a RS to the other RSs in the topology, containing:
-
-
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 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.List<DSInfo>
getReplicaInfos()
Returns the information about DSs in the topology.List<RSInfo>
getRsInfos()
Get the RS infos.String
toString()
-
Methods inherited from class org.opends.server.replication.protocol.ReplicationMsg
decodeMsg, isRetryable
-
-
-
-
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)
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:
version
- 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.
-
getReplicaInfos
public List<DSInfo> getReplicaInfos()
Returns the information about DSs in the topology.- Returns:
- The DS infos
-
-