From 3f27a7ede5ca9df06137254aa32d41d023ac105d 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
---
opends/src/server/org/opends/server/replication/server/changelog/je/MultiDomainDBCursor.java | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/changelog/je/MultiDomainDBCursor.java b/opends/src/server/org/opends/server/replication/server/changelog/je/MultiDomainDBCursor.java
index 690e551..f15cf48 100644
--- a/opends/src/server/org/opends/server/replication/server/changelog/je/MultiDomainDBCursor.java
+++ b/opends/src/server/org/opends/server/replication/server/changelog/je/MultiDomainDBCursor.java
@@ -47,6 +47,8 @@
private final ConcurrentSkipListMap<DN, ServerState> newDomains =
new ConcurrentSkipListMap<DN, ServerState>();
+ private final KeyMatchingStrategy matchingStrategy;
+
private final PositionStrategy positionStrategy;
/**
@@ -54,13 +56,16 @@
*
* @param domainDB
* the replication domain management DB
+ * @param matchingStrategy
+ * Cursor key matching strategy
* @param positionStrategy
- * Cursor position strategy, which allow to indicates at which
- * exact position the cursor must start
+ * Cursor position strategy
*/
- public MultiDomainDBCursor(ReplicationDomainDB domainDB, PositionStrategy positionStrategy)
+ public MultiDomainDBCursor(final ReplicationDomainDB domainDB, final KeyMatchingStrategy matchingStrategy,
+ final PositionStrategy positionStrategy)
{
this.domainDB = domainDB;
+ this.matchingStrategy = matchingStrategy;
this.positionStrategy = positionStrategy;
}
@@ -75,8 +80,7 @@
*/
public void addDomain(DN baseDN, ServerState startAfterState)
{
- newDomains.put(baseDN,
- startAfterState != null ? startAfterState : new ServerState());
+ newDomains.put(baseDN, startAfterState != null ? startAfterState : new ServerState());
}
/** {@inheritDoc} */
@@ -89,7 +93,8 @@
final Entry<DN, ServerState> entry = iter.next();
final DN baseDN = entry.getKey();
final ServerState serverState = entry.getValue();
- final DBCursor<UpdateMsg> domainDBCursor = domainDB.getCursorFrom(baseDN, serverState, positionStrategy);
+ final DBCursor<UpdateMsg> domainDBCursor =
+ domainDB.getCursorFrom(baseDN, serverState, matchingStrategy, positionStrategy);
addCursor(domainDBCursor, baseDN);
iter.remove();
}
--
Gitblit v1.10.0