From 68fde1b50ba683919007b188eccc917708e8a7de Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 08 Oct 2013 06:55:05 +0000
Subject: [PATCH] OPENDJ-1116 Introduce abstraction for the changelog DB

---
 opends/src/server/org/opends/server/replication/server/changelog/je/JEChangeNumberIndexDB.java |   35 +++++++++++++++++++++++++++--------
 1 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/server/changelog/je/JEChangeNumberIndexDB.java b/opends/src/server/org/opends/server/replication/server/changelog/je/JEChangeNumberIndexDB.java
index 9e94e24..daf3f0a 100644
--- a/opends/src/server/org/opends/server/replication/server/changelog/je/JEChangeNumberIndexDB.java
+++ b/opends/src/server/org/opends/server/replication/server/changelog/je/JEChangeNumberIndexDB.java
@@ -198,8 +198,14 @@
     return db.count();
   }
 
-  /** {@inheritDoc} */
-  @Override
+  /**
+   * Returns whether this database is empty.
+   *
+   * @return <code>true</code> if this database is empty, <code>false</code>
+   *         otherwise
+   * @throws ChangelogException
+   *           if a database problem occurs.
+   */
   public boolean isEmpty() throws ChangelogException
   {
     return getLastRecord() == null;
@@ -231,8 +237,9 @@
     return new JEChangeNumberIndexDBCursor(db, startChangeNumber);
   }
 
-  /** {@inheritDoc} */
-  @Override
+  /**
+   * Shutdown this DB.
+   */
   public void shutdown()
   {
     if (shutdown)
@@ -317,8 +324,16 @@
     clear(null);
   }
 
-  /** {@inheritDoc} */
-  @Override
+  /**
+   * Clear the changes from this DB (from both memory cache and DB storage) for
+   * the provided baseDN.
+   *
+   * @param baseDNToClear
+   *          The baseDN for which we want to remove all records from this DB,
+   *          null means all.
+   * @throws ChangelogException
+   *           if a database problem occurs.
+   */
   public void clear(DN baseDNToClear) throws ChangelogException
   {
     if (isEmpty())
@@ -510,8 +525,12 @@
     trimAge = delay;
   }
 
-  /** {@inheritDoc} */
-  @Override
+  /**
+   * Clear the changes from this DB (from both memory cache and DB storage).
+   *
+   * @throws ChangelogException
+   *           if a database problem occurs.
+   */
   public void clear() throws ChangelogException
   {
     db.clear();

--
Gitblit v1.10.0