Package org.opends.admin.ads
Class SuffixDescriptor
- java.lang.Object
-
- org.opends.admin.ads.SuffixDescriptor
-
- All Implemented Interfaces:
Comparable<SuffixDescriptor>
public class SuffixDescriptor extends Object implements Comparable<SuffixDescriptor>
The object of this class represent a topology of replicas across servers that have the same suffix DN. If there is more than one replica on the suffix, the contents of the replicas are replicated.
-
-
Constructor Summary
Constructors Constructor Description SuffixDescriptor(DN suffixDn, ReplicaDescriptor replica)Builds a new SuffixDescriptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(SuffixDescriptor o)booleanequals(Object o)DNgetDN()Returns the DN associated with this suffix descriptor.StringgetId()Returns an Id that is unique for this suffix.Set<ReplicaDescriptor>getReplicas()Returns the replicas associated with this SuffixDescriptor.Set<HostPort>getReplicationServers()Returns the Set of Replication servers for the whole suffix topology.inthashCode()voidsetDN(DN suffixDN)Sets the DN associated with this suffix descriptor.StringtoString()
-
-
-
Constructor Detail
-
SuffixDescriptor
public SuffixDescriptor(DN suffixDn, ReplicaDescriptor replica)
Builds a new SuffixDescriptor.- Parameters:
suffixDn- the suffix DNreplica- the replica
-
-
Method Detail
-
getDN
public DN getDN()
Returns the DN associated with this suffix descriptor.- Returns:
- the DN associated with this suffix descriptor.
-
setDN
public void setDN(DN suffixDN)
Sets the DN associated with this suffix descriptor.- Parameters:
suffixDN- the DN associated with this suffix descriptor.
-
getReplicas
public Set<ReplicaDescriptor> getReplicas()
Returns the replicas associated with this SuffixDescriptor.- Returns:
- a Set containing the replicas associated with this SuffixDescriptor.
-
getReplicationServers
public Set<HostPort> getReplicationServers()
Returns the Set of Replication servers for the whole suffix topology. The servers are provided in their String representation.- Returns:
- the Set of Replication servers for the whole suffix topology.
-
getId
public String getId()
Returns an Id that is unique for this suffix.The id is built from the suffix DN and the ids of the servers holding a replica of it. The server ids are sorted because
getReplicas()hands out aHashSetofReplicaDescriptors, which do not overridehashCode(): without the sort, two descriptors describing the same suffix on the same servers could produce different ids depending on the iteration order.- Returns:
- an Id that is unique for this suffix.
-
compareTo
public int compareTo(SuffixDescriptor o)
- Specified by:
compareToin interfaceComparable<SuffixDescriptor>
-
-