From 6fde75c6138d9f81009935d8d782209d8426e4de Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 29 Apr 2014 12:06:03 +0000
Subject: [PATCH] Added unit tests for encoding/decoding changelog state DB entries.

---
 opends/src/server/org/opends/server/replication/server/changelog/je/ReplicationDB.java |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/server/changelog/je/ReplicationDB.java b/opends/src/server/org/opends/server/replication/server/changelog/je/ReplicationDB.java
index a1dd6ec..71becb1 100644
--- a/opends/src/server/org/opends/server/replication/server/changelog/je/ReplicationDB.java
+++ b/opends/src/server/org/opends/server/replication/server/changelog/je/ReplicationDB.java
@@ -60,7 +60,7 @@
 {
 
   private Database db;
-  private ReplicationDbEnv dbenv;
+  private ReplicationDbEnv dbEnv;
   private ReplicationServer replicationServer;
   private int serverId;
   private DN baseDN;
@@ -117,22 +117,22 @@
    * @param serverId The identifier of the LDAP server.
    * @param baseDN The baseDN of the replication domain.
    * @param replicationServer The ReplicationServer that needs to be shutdown.
-   * @param dbenv The Db environment to use to create the db.
+   * @param dbEnv The Db environment to use to create the db.
    * @throws ChangelogException If a database problem happened
    */
   public ReplicationDB(int serverId, DN baseDN,
-      ReplicationServer replicationServer, ReplicationDbEnv dbenv)
+      ReplicationServer replicationServer, ReplicationDbEnv dbEnv)
       throws ChangelogException
   {
     this.serverId = serverId;
     this.baseDN = baseDN;
-    this.dbenv = dbenv;
+    this.dbEnv = dbEnv;
     this.replicationServer = replicationServer;
 
     // Get or create the associated ReplicationServerDomain and Db.
     final ReplicationServerDomain domain =
         replicationServer.getReplicationServerDomain(baseDN, true);
-    db = dbenv.getOrAddDb(serverId, baseDN, domain.getGenerationId());
+    db = dbEnv.getOrAddReplicationDB(serverId, baseDN, domain.getGenerationId());
 
     intializeCounters();
   }
@@ -649,7 +649,7 @@
 
         // Create the transaction that will protect whatever done with this
         // write cursor.
-        localTxn = dbenv.beginTransaction();
+        localTxn = dbEnv.beginTransaction();
         localCursor = db.openCursor(localTxn, null);
 
         txn = localTxn;
@@ -701,7 +701,7 @@
         }
         catch (DatabaseException e)
         {
-          dbenv.shutdownOnException(e);
+          dbEnv.shutdownOnException(e);
         }
       }
     }
@@ -855,14 +855,14 @@
       }
 
       // Clears the reference to this serverID
-      dbenv.clearServerId(baseDN, serverId);
+      dbEnv.clearServerId(baseDN, serverId);
 
       final Database oldDb = db;
       db = null; // In case there's a failure between here and recreation.
-      dbenv.clearDb(oldDb);
+      dbEnv.clearDb(oldDb);
 
       // RE-create the db
-      db = dbenv.getOrAddDb(serverId, baseDN, -1);
+      db = dbEnv.getOrAddReplicationDB(serverId, baseDN, -1);
     }
     catch (Exception e)
     {

--
Gitblit v1.10.0