From bcd9325b7d47b6932d140a15ee761252e130ab7e Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 09 Oct 2013 13:35:05 +0000
Subject: [PATCH] OPENDJ-1116 Introduce abstraction for the changelog DB

---
 opends/src/server/org/opends/server/replication/common/ServerState.java |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/common/ServerState.java b/opends/src/server/org/opends/server/replication/common/ServerState.java
index 888a1a2..ef5bd1b 100644
--- a/opends/src/server/org/opends/server/replication/common/ServerState.java
+++ b/opends/src/server/org/opends/server/replication/common/ServerState.java
@@ -529,16 +529,19 @@
   }
 
   /**
-   * Build a copy of the ServerState with only CSNs older than
-   * a specific CSN. This is used when building the initial
-   * Cookie in the External Changelog, to cope with purged changes.
-   * @param csn The CSN to compare the ServerState with
+   * Build a copy of the ServerState with only CSNs older than a provided
+   * timestamp. This is used when building the initial Cookie in the External
+   * Changelog, to cope with purged changes.
+   *
+   * @param timestamp
+   *          The timestamp to compare the ServerState against
    * @return a copy of the ServerState which only contains the CSNs older than
    *         csn.
    */
-  public ServerState duplicateOnlyOlderThan(CSN csn)
+  public ServerState duplicateOnlyOlderThan(long timestamp)
   {
-    ServerState newState = new ServerState();
+    final CSN csn = new CSN(timestamp, 0, 0);
+    final ServerState newState = new ServerState();
     synchronized (serverIdToCSN)
     {
       for (CSN change : serverIdToCSN.values())

--
Gitblit v1.10.0