From 5c5b4b334c4ecb54c46cf909f3aabefb68171fe6 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 09 Oct 2013 08:43:46 +0000
Subject: [PATCH] OPENDJ-1116 Introduce abstraction for the changelog DB
---
opends/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java b/opends/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java
index bc57fbe..59c62cf 100644
--- a/opends/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java
+++ b/opends/src/server/org/opends/server/replication/server/changelog/api/ReplicationDomainDB.java
@@ -73,6 +73,9 @@
/**
* Retrieves the latest trim date for the specified replication domain.
+ * <p>
+ * FIXME will be removed when ECLServerHandler will not be responsible anymore
+ * for lazily building the ChangeNumberIndexDB.
*
* @param baseDN
* the replication domain baseDN
@@ -215,4 +218,34 @@
boolean publishUpdateMsg(DN baseDN, UpdateMsg updateMsg)
throws ChangelogException;
+ /**
+ * Let the DB know this replica is alive.
+ * <p>
+ * This method allows the medium consistency point to move forward in case
+ * this replica did not publish new changes.
+ *
+ * @param baseDN
+ * the replication domain baseDN
+ * @param csn
+ * The CSN heartbeat sent by this replica (contains the serverId and
+ * timestamp of the heartbeat)
+ */
+ void replicaHeartbeat(DN baseDN, CSN csn);
+
+ /**
+ * Let the DB know this replica is going down.
+ * <p>
+ * This method allows to let the medium consistency point move forward while
+ * this replica is offline.
+ * <p>
+ * Note: This method must not be called to let the DB know the replica is not
+ * sending heartbeats anymore, i.e. it must not be used in case of suspected
+ * network partition.
+ *
+ * @param baseDN
+ * the replication domain baseDN
+ * @param serverId
+ * The replica's serverId going offline
+ */
+ void replicaOffline(DN baseDN, int serverId);
}
--
Gitblit v1.10.0