From 905c53e2e203e42d5462ecc0acfea80b81c70967 Mon Sep 17 00:00:00 2001
From: pgamba <pgamba@localhost>
Date: Mon, 26 Oct 2009 15:08:24 +0000
Subject: [PATCH] Comments improvment and code cleaning

---
 opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java |   50 +++-----------------------------------------------
 1 files changed, 3 insertions(+), 47 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java b/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
index cabec3a..d41ee2c 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
+++ b/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

--
Gitblit v1.10.0