From 53ac6966e65a907785505fd1da1ac196730cd442 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 22 Nov 2013 08:24:47 +0000
Subject: [PATCH] Checkpoint commit for OPENDJ-1174 Transfer responsibility for populating the ChangeNumberIndexDB to ChangelogDB

---
 opends/src/server/org/opends/server/replication/common/MultiDomainServerState.java |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/common/MultiDomainServerState.java b/opends/src/server/org/opends/server/replication/common/MultiDomainServerState.java
index 9465346..7afe2d2 100644
--- a/opends/src/server/org/opends/server/replication/common/MultiDomainServerState.java
+++ b/opends/src/server/org/opends/server/replication/common/MultiDomainServerState.java
@@ -189,16 +189,23 @@
   }
 
   /**
-   * Returns the ServerState associated to the provided replication domain's
-   * baseDN.
+   * Returns the CSN associated to the provided replication domain's baseDN and
+   * serverId.
    *
    * @param baseDN
    *          the replication domain's baseDN
+   * @param serverId
+   *          the serverId
    * @return the associated ServerState
    */
-  public ServerState get(DN baseDN)
+  public CSN getCSN(DN baseDN, int serverId)
   {
-    return list.get(baseDN);
+    final ServerState ss = list.get(baseDN);
+    if (ss != null)
+    {
+      return ss.getCSN(serverId);
+    }
+    return null;
   }
 
   /**
@@ -260,7 +267,7 @@
   public static Map<DN, ServerState> splitGenStateToServerStates(
       String multiDomainServerState) throws DirectoryException
   {
-    final Map<DN, ServerState> startStates = new TreeMap<DN, ServerState>();
+    Map<DN, ServerState> startStates = new TreeMap<DN, ServerState>();
     if (multiDomainServerState != null && multiDomainServerState.length() > 0)
     {
       try

--
Gitblit v1.10.0