From f8c7aa009c68e43c46ee23bc27a211b1687d8502 Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Tue, 16 Sep 2014 15:05:25 +0000
Subject: [PATCH] OPENDJ-1444 CR-4537 Remove previous cookie from storage of ChangeNumberIndexDB
---
opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/file/FileReplicaDB.java | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/file/FileReplicaDB.java b/opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/file/FileReplicaDB.java
index db6d2fb..345b950 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/file/FileReplicaDB.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/server/changelog/file/FileReplicaDB.java
@@ -41,6 +41,7 @@
import org.opends.server.replication.server.ReplicationServerDomain;
import org.opends.server.replication.server.changelog.api.ChangelogException;
import org.opends.server.replication.server.changelog.api.DBCursor;
+import org.opends.server.replication.server.changelog.api.DBCursor.KeyMatchingStrategy;
import org.opends.server.replication.server.changelog.api.DBCursor.PositionStrategy;
import org.opends.server.replication.server.changelog.file.Log.RepositionableCursor;
import org.opends.server.types.Attribute;
@@ -202,23 +203,24 @@
/**
* Returns a cursor that allows to retrieve the update messages from this DB.
- * The starting position is defined by the provided CSN and cursor positioning
- * strategy.
+ * The actual starting position is defined by the provided CSN, the key
+ * matching strategy and the positioning strategy.
*
* @param startCSN
* The position where the cursor must start. If null, start from the
* oldest CSN
+ * @param matchingStrategy
+ * Cursor key matching strategy
* @param positionStrategy
- * Cursor position strategy, which allow to choose if cursor must
- * start from the provided CSN or just after the provided CSN.
+ * Cursor position strategy
* @return a new {@link DBCursor} to retrieve update messages.
* @throws ChangelogException
* if a database problem happened
*/
- DBCursor<UpdateMsg> generateCursorFrom(final CSN startCSN, final PositionStrategy positionStrategy)
- throws ChangelogException
+ DBCursor<UpdateMsg> generateCursorFrom(final CSN startCSN, final KeyMatchingStrategy matchingStrategy,
+ final PositionStrategy positionStrategy) throws ChangelogException
{
- RepositionableCursor<CSN, UpdateMsg> cursor = log.getNearestCursor(startCSN, positionStrategy);
+ RepositionableCursor<CSN, UpdateMsg> cursor = log.getCursor(startCSN, matchingStrategy, positionStrategy);
return new FileReplicaDBCursor(cursor, startCSN, positionStrategy);
}
--
Gitblit v1.10.0