From 4cd3d75a0c4b165101245c51f7ca4b8f8bdad7dc Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 07 Oct 2013 11:02:10 +0000
Subject: [PATCH] OPENDJ-1116 Introduce abstraction for the changelog DB
---
opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java | 65 --------------------------------
1 files changed, 0 insertions(+), 65 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 4f3be6f..b7690a2 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
+++ b/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
@@ -2561,71 +2561,6 @@
}
/**
- * Computes the eligible server state for the domain.
- *
- * <pre>
- * s1 s2 s3
- * -- -- --
- * csn31
- * csn15
- *
- * ----------------------------------------- eligibleCSN
- * csn14
- * csn26
- * csn13
- * </pre>
- *
- * The eligibleState is : s1;csn14 / s2;csn26 / s3;csn31
- *
- * @param eligibleCSN
- * The provided eligible CSN.
- * @return The computed eligible server state.
- */
- public ServerState getEligibleState(CSN eligibleCSN)
- {
- ServerState latestState = getLatestServerState();
-
- // The result is initialized from the dbState.
- // From it, we don't want to keep the changes newer than eligibleCSN.
- ServerState result = latestState.duplicate();
-
- if (eligibleCSN != null)
- {
- for (CSN mostRecentDbCSN : latestState)
- {
- try {
- // Is the most recent change in the Db newer than eligible CSN ?
- // if yes (like csn15 in the example above, then we have to go back
- // to the Db and look for the change older than eligible CSN (csn14)
- if (eligibleCSN.olderOrEqual(mostRecentDbCSN))
- {
- // let's try to seek the first change <= eligibleCSN
- CSN newCSN = domainDB.getCSNAfter(baseDN,
- mostRecentDbCSN.getServerId(), eligibleCSN);
- result.update(newCSN);
- }
- else
- {
- // for this serverId, all changes in the ChangelogDb are holder
- // than eligibleCSN, the most recent in the db is our guy.
- result.update(mostRecentDbCSN);
- }
- } catch (Exception e) {
- logError(ERR_WRITER_UNEXPECTED_EXCEPTION
- .get(stackTraceToSingleLineString(e)));
- TRACER.debugCaught(DebugLogLevel.ERROR, e);
- }
- }
- }
-
- if (debugEnabled())
- {
- debug("getEligibleState() result is " + result);
- }
- return result;
- }
-
- /**
* Returns the start state of the domain, made of the oldest CSN stored for
* each serverId.
* <p>
--
Gitblit v1.10.0