From f9fd01abc48e20d136192a5c45e215910d3ba320 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 04 Oct 2013 09:31:56 +0000
Subject: [PATCH] OPENDJ-1116 Introduce abstraction for the changelog DB
---
opends/src/server/org/opends/server/replication/server/changelog/api/ChangelogDB.java | 26 ++++++++++----------------
1 files changed, 10 insertions(+), 16 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 cab92e2..34f8644 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
@@ -26,10 +26,10 @@
*/
package org.opends.server.replication.server.changelog.api;
-import java.util.Map;
import java.util.Set;
import org.opends.server.replication.common.CSN;
+import org.opends.server.replication.common.ServerState;
import org.opends.server.replication.protocol.UpdateMsg;
import org.opends.server.types.DN;
@@ -51,14 +51,6 @@
// DB control methods
/**
- * Get the replication server database directory. This is used by tests to do
- * some cleanup.
- *
- * @return the database directory name
- */
- String getDBDirectoryName();
-
- /**
* 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.
@@ -109,7 +101,7 @@
*
* @param baseDN
* the replication domain baseDN
- * @return a set of integers holding the serverIds
+ * @return an unmodifiable set of integers holding the serverIds
*/
Set<Integer> getDomainServerIds(DN baseDN);
@@ -128,10 +120,11 @@
*
* @param baseDN
* the replication domain baseDN
- * @return a {serverId => oldest CSN} Map. If a replica DB is empty or closed,
- * the oldest CSN will be null for that replica.
+ * @return a new ServerState object holding the {serverId => oldest CSN}
+ * mapping. If a replica DB is empty or closed, the oldest CSN will be
+ * null for that replica. The caller owns the generated ServerState.
*/
- Map<Integer, CSN> getDomainOldestCSNs(DN baseDN);
+ ServerState getDomainOldestCSNs(DN baseDN);
/**
* Returns the newest {@link CSN}s of each serverId for the specified
@@ -139,10 +132,11 @@
*
* @param baseDN
* the replication domain baseDN
- * @return a {serverId => newest CSN} Map. If a replica DB is empty or closed,
- * the newest CSN will be null for that replica.
+ * @return a new ServerState object holding the {serverId => newest CSN} Map.
+ * If a replica DB is empty or closed, the newest CSN will be null for
+ * that replica. The caller owns the generated ServerState.
*/
- Map<Integer, CSN> getDomainNewestCSNs(DN baseDN);
+ ServerState getDomainNewestCSNs(DN baseDN);
/**
* Retrieves the latest trim date for the specified replication domain.
--
Gitblit v1.10.0