From 4772c4aec3a23175ad9ac33b4cd843062168d335 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 30 Aug 2013 12:29:54 +0000
Subject: [PATCH] OPENDJ-1116 Introduce abstraction for the changelog DB

---
 opends/src/server/org/opends/server/replication/server/MessageHandler.java |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/server/MessageHandler.java b/opends/src/server/org/opends/server/replication/server/MessageHandler.java
index b69eb3e..bf15f42 100644
--- a/opends/src/server/org/opends/server/replication/server/MessageHandler.java
+++ b/opends/src/server/org/opends/server/replication/server/MessageHandler.java
@@ -281,7 +281,7 @@
            *           restart as usual
            *   load this change on the delayList
            */
-          NavigableSet<ReplicationDBCursor> sortedCursors = null;
+          NavigableSet<ReplicaDBCursor> sortedCursors = null;
           try
           {
             sortedCursors = collectAllCursorsWithChanges();
@@ -395,7 +395,7 @@
   }
 
   private UpdateMsg nextOldestUpdateMsg(
-      NavigableSet<ReplicationDBCursor> sortedCursors)
+      NavigableSet<ReplicaDBCursor> sortedCursors)
   {
     /*
      * The cursors are sorted based on the currentChange of each cursor to
@@ -404,15 +404,15 @@
      * it is necessary to remove and eventually add again a cursor (after moving
      * it forward).
      */
-    final ReplicationDBCursor cursor = sortedCursors.pollFirst();
+    final ReplicaDBCursor cursor = sortedCursors.pollFirst();
     final UpdateMsg result = cursor.getChange();
     cursor.next();
     addCursorIfNotEmpty(sortedCursors, cursor);
     return result;
   }
 
-  private void addCursorIfNotEmpty(Collection<ReplicationDBCursor> cursors,
-      ReplicationDBCursor cursor)
+  private void addCursorIfNotEmpty(Collection<ReplicaDBCursor> cursors,
+      ReplicaDBCursor cursor)
   {
     if (cursor != null)
     {
@@ -461,16 +461,16 @@
           the lateQueue when it will send the next update but we are not yet
           there. So let's take the last change not sent directly from the db.
           */
-          result = findOldestChangeNumberFromReplicationDBs();
+          result = findOldestChangeNumberFromReplicaDBs();
         }
       }
     }
     return result;
   }
 
-  private ChangeNumber findOldestChangeNumberFromReplicationDBs()
+  private ChangeNumber findOldestChangeNumberFromReplicaDBs()
   {
-    SortedSet<ReplicationDBCursor> sortedCursors = null;
+    SortedSet<ReplicaDBCursor> sortedCursors = null;
     try
     {
       sortedCursors = collectAllCursorsWithChanges();
@@ -488,16 +488,16 @@
   }
 
   /**
-   * Collects all the replication DB cursors that have changes and sort them
+   * Collects all the {@link ReplicaDBCursor}s that have changes and sort them
    * with the oldest {@link ChangeNumber} first.
    *
    * @return a List of cursors with changes sorted by their {@link ChangeNumber}
    *         (oldest first)
    */
-  private NavigableSet<ReplicationDBCursor> collectAllCursorsWithChanges()
+  private NavigableSet<ReplicaDBCursor> collectAllCursorsWithChanges()
   {
-    final NavigableSet<ReplicationDBCursor> results =
-        new TreeSet<ReplicationDBCursor>(new ReplicationDBCursorComparator());
+    final NavigableSet<ReplicaDBCursor> results =
+        new TreeSet<ReplicaDBCursor>(new ReplicaDBCursorComparator());
     for (int serverId : replicationServerDomain.getServerIds())
     {
       // get the last already sent CN from that server to get a cursor

--
Gitblit v1.10.0