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

pgamba
26.08.2009 905c53e2e203e42d5462ecc0acfea80b81c70967
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
@@ -83,7 +83,6 @@
import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.ResultCode;
import org.opends.server.util.TimeThread;
import com.sleepycat.je.DatabaseException;
@@ -2443,8 +2442,10 @@
  synchronized protected MonitorData computeMonitorData()
    throws DirectoryException
  {
    // Update the monitorData of all domains if this was necessary.
    // Update the monitorData of ALL domains if this was necessary.
    replicationServer.computeMonitorData();
    // Returns the monitorData of THIS domain
    return monitorData;
  }
@@ -2935,51 +2936,6 @@
  }
  /**
   * TODO: code cleaning - remove this method.
   * Computes the change number eligible to the ECL.
   * @return null if the domain does not play in eligibility.
   */
  public ChangeNumber computeEligibleCN2()
  {
    ChangeNumber eligibleCN = null;
    ServerState heartbeatState = getChangeTimeHeartbeatState();
    if (heartbeatState==null)
      return null;
    // compute eligible CN
    ServerState hbState = heartbeatState.duplicate();
    Iterator<Integer> it = hbState.iterator();
    while (it.hasNext())
    {
      int sid = it.next();
      ChangeNumber storedCN = hbState.getMaxChangeNumber(sid);
      // If the most recent UpdateMsg or CLHeartbeatMsg received is very old
      // then the server is considered down and not considered for eligibility
      if (TimeThread.getTime()-storedCN.getTime()>2000)
      {
        if (debugEnabled())
          TRACER.debugInfo("In " + this.getName() +
            " Server " + sid
            + " is not considered for eligibility ... potentially down");
        continue;
      }
      if ((eligibleCN == null) || (storedCN.older(eligibleCN)))
      {
        eligibleCN = storedCN;
      }
    }
    if (debugEnabled())
      TRACER.debugInfo("In " + this.getName() +
        " computeEligibleCN() returns " + eligibleCN);
    return eligibleCN;
  }
  /**
   * Computes the eligible server state for the domain.
   *
   *     s1               s2          s3