| | |
| | | * |
| | | * @return The error code. |
| | | */ |
| | | |
| | | public static int mainCLI(String[] args) |
| | | { |
| | | return mainCLI(args, true, System.out, System.err); |
| | |
| | | ERR_REPLICATION_UPDATING_ADS.get(adce.getMessageObject()), |
| | | ERROR_UPDATING_ADS, adce); |
| | | } |
| | | |
| | | if (!adsAlreadyReplicated && !adsMergeDone) |
| | | { |
| | | try |
| | |
| | | |
| | | private void addReplicaServerIds(Set<Integer> replicaServerIds, ServerDescriptor serverDesc1, DN baseDN) |
| | | { |
| | | ReplicaDescriptor replica = findReplicaForSuffixDN(serverDesc1.getReplicas(), baseDN); |
| | | if (replica != null && replica.isReplicated()) |
| | | ReplicaDescriptor replica = findReplicatedReplicaForSuffixDN(serverDesc1.getReplicas(), baseDN); |
| | | if (replica != null) |
| | | { |
| | | replicaServerIds.add(replica.getServerId()); |
| | | } |
| | |
| | | return null; |
| | | } |
| | | |
| | | private ReplicaDescriptor findReplicatedReplicaForSuffixDN(Set<ReplicaDescriptor> replicas, DN baseDN) |
| | | { |
| | | for (ReplicaDescriptor replica : replicas) |
| | | { |
| | | if (replica.isReplicated() && replica.getSuffix().getDN().equals(baseDN)) |
| | | { |
| | | return replica; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | private Set<DN> findAllReplicatedSuffixDNs(Collection<ReplicaDescriptor> replicas) |
| | | { |
| | | Set<DN> results = new HashSet<>(); |