| | |
| | | * information: "Portions Copyright [year] [name of copyright owner]". |
| | | * |
| | | * Copyright 2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2015 ForgeRock AS. |
| | | * Portions Copyright 2015-2016 ForgeRock AS. |
| | | */ |
| | | package org.opends.admin.ads; |
| | | |
| | | import java.util.HashSet; |
| | | import java.util.Set; |
| | | |
| | | import org.forgerock.opendj.ldap.DN; |
| | | |
| | | /** |
| | | * 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 |
| | |
| | | */ |
| | | public class SuffixDescriptor |
| | | { |
| | | private String suffixDN; |
| | | private DN suffixDN; |
| | | private final Set<ReplicaDescriptor> replicas = new HashSet<>(); |
| | | |
| | | /** |
| | |
| | | * |
| | | * @return the DN associated with this suffix descriptor. |
| | | */ |
| | | public String getDN() |
| | | public String getDN() // FIXME change return type to DN |
| | | { |
| | | return suffixDN.toString(); |
| | | } |
| | | |
| | | /** |
| | | * Returns the DN associated with this suffix descriptor. |
| | | * |
| | | * @return the DN associated with this suffix descriptor. |
| | | */ |
| | | public DN getDnAsDn() |
| | | { |
| | | return suffixDN; |
| | | } |
| | |
| | | * @param suffixDN |
| | | * the DN associated with this suffix descriptor. |
| | | */ |
| | | public void setDN(String suffixDN) |
| | | public void setDN(DN suffixDN) |
| | | { |
| | | this.suffixDN = suffixDN; |
| | | } |
| | |
| | | { |
| | | buf.append("-").append(replica.getServer().getId()); |
| | | } |
| | | |
| | | return buf.toString(); |
| | | } |
| | | } |