mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noël Rouvignac
13.15.2016 e61d6d0a55d022a0768e730521bfea36ad506f9d
opendj-server-legacy/src/main/java/org/opends/admin/ads/ReplicaDescriptor.java
@@ -19,14 +19,19 @@
import java.util.HashSet;
import java.util.Set;
/** The object of this class represent a Replica (i.e. a suffix in a given server). */
/**
 * The object of this class represent a Replica, i.e. a suffix in a given server instance.
 * <p>
 * Note: this does not represent a replication server.
 */
public class ReplicaDescriptor
{
  private SuffixDescriptor suffix;
  private int entries = -1;
  /** Number of entries held by this replica. */
  private int nbEntries = -1;
  private ServerDescriptor server;
  private final Set<String> replicationServers = new HashSet<>();
  /** This corresponds to the server-id of this replica. */
  private int replicationId = -1;
  private int missingChanges = -1;
  private long ageOfOldestMissingChange = -1;
@@ -39,7 +44,7 @@
   */
  public int getEntries()
  {
    return entries;
    return nbEntries;
  }
  /**
@@ -64,11 +69,11 @@
  /**
   * Sets the number of entries contained in the replica.
   * @param entries the number of entries contained in the replica.
   * @param nbEntries the number of entries contained in the replica.
   */
  public void setEntries(int entries)
  public void setEntries(int nbEntries)
  {
    this.entries = entries;
    this.nbEntries = nbEntries;
  }
  /**
@@ -234,4 +239,18 @@
  {
    this.objectClasses = objectClasses;
  }
  @Override
  public String toString()
  {
    return getClass().getSimpleName()
        + "(domain-name=" + suffix.getDN()
        + ", server-id=" + replicationId
        + ", host-name=" + server.getReplicationServerHostPort()
        + ", nb-entries=" + nbEntries
        + ", rs-port=" + server.getReplicationServerPort()
        + ", missing-changes=" + missingChanges
        + ", age-of-oldest-missing-change=" + ageOfOldestMissingChange
        + ")";
  }
}