From 225aaf491fb097f9ab165de1c4d24aaa68670784 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 24 Sep 2013 09:19:20 +0000
Subject: [PATCH] OPENDJ-1116 Introduce abstraction for the changelog DB
---
opends/src/server/org/opends/server/replication/server/changelog/api/ChangelogDB.java | 25 ++++++++++---------------
1 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/changelog/api/ChangelogDB.java b/opends/src/server/org/opends/server/replication/server/changelog/api/ChangelogDB.java
index 0ff0187..f8bd02d 100644
--- a/opends/src/server/org/opends/server/replication/server/changelog/api/ChangelogDB.java
+++ b/opends/src/server/org/opends/server/replication/server/changelog/api/ChangelogDB.java
@@ -29,7 +29,6 @@
import java.util.Map;
import java.util.Set;
-import org.opends.server.config.ConfigException;
import org.opends.server.replication.common.CSN;
import org.opends.server.replication.protocol.UpdateMsg;
import org.opends.server.types.DN;
@@ -52,31 +51,27 @@
// DB control methods
/**
- * Set the directory to be used by the replication database.
- *
- * @param dbDirName
- * the directory for use by the replication database
- * @throws ConfigException
- * if a problem occurs opening the directory
- */
- void setReplicationDBDirectory(String dbDirName) throws ConfigException;
-
- /**
* Get the replication server database directory. This is used by tests to do
* some cleanup.
*
* @return the database directory name
*/
- String getDBDirName();
+ String getDBDirectoryName();
/**
- * Initializes the replication database.
+ * Initializes the replication database by reading its previous state and
+ * building the relevant ReplicaDBs according to the previous state. This
+ * method must be called once before using the ChangelogDB.
*/
void initializeDB();
/**
- * Sets the purge delay for the replication database. This purge delay is a
- * best effort.
+ * Sets the purge delay for the replication database. Can be called while the
+ * database is running.
+ * <p>
+ * Purging happens on a best effort basis, i.e. the purge delay is used by the
+ * replication database to know which data can be purged, but there are no
+ * guarantees on when the purging will actually happen.
*
* @param delayInMillis
* the purge delay in milliseconds
--
Gitblit v1.10.0