From 87b6a9294f437fd6312c2fbe2292ee64babd8d7e Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 10 Oct 2013 14:45:51 +0000
Subject: [PATCH] OPENDJ-1116 Introduce abstraction for the changelog DB

---
 opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDB.java |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDB.java b/opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDB.java
index 6ccb0c2..9a1c9f8 100644
--- a/opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDB.java
+++ b/opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDB.java
@@ -33,8 +33,7 @@
 
 import org.opends.messages.MessageBuilder;
 import org.opends.server.loggers.debug.DebugTracer;
-import org.opends.server.replication.server.changelog.api.CNIndexRecord;
-import org.opends.server.replication.server.changelog.api.ChangelogException;
+import org.opends.server.replication.server.changelog.api.*;
 import org.opends.server.types.DebugLogLevel;
 
 import com.sleepycat.je.*;
@@ -83,9 +82,9 @@
    * Add a record to the database.
    *
    * @param record
-   *          the provided {@link CNIndexRecord} to be stored.
+   *          the provided {@link ChangeNumberIndexRecord} to be stored.
    */
-  public void addRecord(CNIndexRecord record)
+  public void addRecord(ChangeNumberIndexRecord record)
   {
     try
     {
@@ -220,7 +219,7 @@
    * @throws ChangelogException
    *           if a database problem occurred
    */
-  public CNIndexRecord readFirstRecord() throws ChangelogException
+  public ChangeNumberIndexRecord readFirstRecord() throws ChangelogException
   {
     try
     {
@@ -256,7 +255,7 @@
     }
   }
 
-  private CNIndexRecord newCNIndexRecord(ReplicationDraftCNKey key,
+  private ChangeNumberIndexRecord newCNIndexRecord(ReplicationDraftCNKey key,
       DatabaseEntry data) throws ChangelogException
   {
     return new DraftCNData(key.getChangeNumber(), data.getData()).getRecord();
@@ -297,7 +296,7 @@
    * @throws ChangelogException
    *           if a database problem occurred
    */
-  public CNIndexRecord readLastRecord() throws ChangelogException
+  public ChangeNumberIndexRecord readLastRecord() throws ChangelogException
   {
     try
     {
@@ -357,7 +356,7 @@
     private final Transaction txn;
     private final ReplicationDraftCNKey key;
     private final DatabaseEntry entry = new DatabaseEntry();
-    private CNIndexRecord record;
+    private ChangeNumberIndexRecord record;
     private boolean isClosed = false;
 
 
@@ -561,11 +560,12 @@
     }
 
     /**
-     * Returns the {@link CNIndexRecord} at the current position of the cursor.
+     * Returns the {@link ChangeNumberIndexRecord} at the current position of
+     * the cursor.
      *
-     * @return The current {@link CNIndexRecord}.
+     * @return The current {@link ChangeNumberIndexRecord}.
      */
-    public CNIndexRecord currentRecord()
+    public ChangeNumberIndexRecord currentRecord()
     {
       if (isClosed)
       {

--
Gitblit v1.10.0