From fe9b2994e042be96cb148e52fc58653fcf09aa9d Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 04 Sep 2013 08:43:15 +0000
Subject: [PATCH] In javadocs, variable names, method names, etc., renamed: - "draft change number" to "change number" - "draftCN" to "change number" - "sn" to "cn" in tests. Fixed wrong usage of seqnum (only defined for CSNs - see the various IETF draft)
---
opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDbIterator.java | 25 ++++++++++++-------------
1 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDbIterator.java b/opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDbIterator.java
index adce848..8243aca 100644
--- a/opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDbIterator.java
+++ b/opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDbIterator.java
@@ -46,19 +46,20 @@
private DraftCNDBCursor draftCNDbCursor;
/**
- * Creates a new ReplicationIterator.
- * All created iterator must be released by the caller using the
- * releaseCursor() method.
+ * Creates a new ReplicationIterator. All created iterator must be released by
+ * the caller using the {@link #close()} method.
*
- * @param db The db where the iterator must be created.
- * @param startDraftCN The draft CN after which the iterator
- * must start.
- * @throws ChangelogException If a database problem happened.
+ * @param db
+ * The db where the iterator must be created.
+ * @param startChangeNumber
+ * The change number after which the iterator must start.
+ * @throws ChangelogException
+ * If a database problem happened.
*/
- public DraftCNDbIterator(DraftCNDB db, int startDraftCN)
+ public DraftCNDbIterator(DraftCNDB db, int startChangeNumber)
throws ChangelogException
{
- draftCNDbCursor = db.openReadCursor(startDraftCN);
+ draftCNDbCursor = db.openReadCursor(startChangeNumber);
if (draftCNDbCursor == null)
{
throw new ChangelogException(Message.raw("no new change"));
@@ -97,11 +98,9 @@
/** {@inheritDoc} */
@Override
- public int getDraftCN()
+ public int getChangeNumber()
{
- ReplicationDraftCNKey sk = (ReplicationDraftCNKey) draftCNDbCursor.getKey();
- int currentSeqnum = sk.getDraftCN();
- return currentSeqnum;
+ return ((ReplicationDraftCNKey) draftCNDbCursor.getKey()).getChangeNumber();
}
/** {@inheritDoc} */
--
Gitblit v1.10.0