From 0a51f5fbeb5e99c52f1be8973ae656de34fab75f Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 14 Aug 2013 09:30:53 +0000
Subject: [PATCH] OPENDJ-1116 Introduce abstraction for the changelog DB
---
opends/src/server/org/opends/server/replication/server/changelog/je/JEReplicationIterator.java | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/changelog/je/JEReplicationIterator.java b/opends/src/server/org/opends/server/replication/server/changelog/je/JEReplicationIterator.java
index e09fef5..e8dae9f 100644
--- a/opends/src/server/org/opends/server/replication/server/changelog/je/JEReplicationIterator.java
+++ b/opends/src/server/org/opends/server/replication/server/changelog/je/JEReplicationIterator.java
@@ -32,8 +32,7 @@
import org.opends.server.replication.protocol.UpdateMsg;
import org.opends.server.replication.server.changelog.api.ChangelogException;
import org.opends.server.replication.server.changelog.api.ReplicationIterator;
-import org.opends.server.replication.server.changelog.je.ReplicationDB
- .ReplServerDBCursor;
+import org.opends.server.replication.server.changelog.je.ReplicationDB.*;
/**
* Berkeley DB JE implementation of IReplicationIterator.
@@ -52,20 +51,20 @@
* releaseCursor() method.
*
* @param db The db where the iterator must be created.
- * @param changeNumber The ChangeNumber after which the iterator must start.
+ * @param startAfterCN The ChangeNumber after which the iterator must start.
* @param dbHandler The associated DbHandler.
* @throws ChangelogException if a database problem happened.
*/
- public JEReplicationIterator(ReplicationDB db, ChangeNumber changeNumber,
+ public JEReplicationIterator(ReplicationDB db, ChangeNumber startAfterCN,
DbHandler dbHandler) throws ChangelogException
{
this.db = db;
this.dbHandler = dbHandler;
- this.lastNonNullCurrentCN = changeNumber;
+ this.lastNonNullCurrentCN = startAfterCN;
try
{
- cursor = db.openReadCursor(changeNumber);
+ cursor = db.openReadCursor(startAfterCN);
}
catch(Exception e)
{
@@ -79,7 +78,7 @@
dbHandler.flush();
// look again in the db
- cursor = db.openReadCursor(changeNumber);
+ cursor = db.openReadCursor(startAfterCN);
if (cursor == null)
{
throw new ChangelogException(Message.raw("no new change"));
--
Gitblit v1.10.0