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

gbellato
23.04.2009 141f11d16e8af51fdf75334c190959d87c6191fb
opendj-sdk/opends/src/server/org/opends/server/replication/server/MonitorData.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Copyright 2009 Sun Microsystems, Inc.
 */
package org.opends.server.replication.server;
@@ -193,7 +193,7 @@
    }
    // Computes the missing changes counters for RS :
    // Sum the difference of seqnuence numbers for each element in the States.
    // Sum the difference of sequence numbers for each element in the States.
    for (short lsiSid : RSStates.keySet())
    {
@@ -390,4 +390,50 @@
    }
  }
  /**
   * Returns an iterator on the serverId of the Replicas for which
   * we have monitoring data.
   *
   * @return The iterator.
   */
  public Iterator<Short> ldapIterator()
  {
    return LDAPStates.keySet().iterator();
  }
  /**
   * Returns an iterator on the serverId of the Replication Servers for which
   * we have monitoring data.
   *
   * @return The iterator.
   */
  public Iterator<Short> rsIterator()
  {
    return RSStates.keySet().iterator();
  }
  /**
   * Get the state of the RS server with the provided serverId.
   *
   * @param serverId The server ID.
   * @return The server state.
   */
  public ServerState getRSStates(short serverId)
  {
    return RSStates.get(serverId);
  }
  /**
   * Get an approximation of the date of the first missing update.
   *
   * @param serverId The server ID.
   * @return The date.
   */
  public long getRSApproxFirstMissingDate(short serverId)
  {
    Long res;
    if ((res = fmRSDate.get(serverId)) != null)
      return res;
    return 0;
  }
}