From 341d63e9c3a5158d6da9abcc0e9d89f2fe59046c Mon Sep 17 00:00:00 2001
From: pgamba <pgamba@localhost>
Date: Tue, 25 Aug 2009 08:39:19 +0000
Subject: [PATCH] Fix 4184 ECL: lastExternalChangelogCookie contains info about private naming contexts
---
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServer.java | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServer.java b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServer.java
index 4c98bbe..c6c9263 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServer.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServer.java
@@ -1699,4 +1699,32 @@
return new int[]{firstDraftCN, lastDraftCN};
}
+ /**
+ * Returns the last (newest) cookie value.
+ * @param excludedServiceIDs The list of serviceIDs excluded from ECL.
+ * @return the last cookie value.
+ */
+ public MultiDomainServerState getLastECLCookie(
+ ArrayList<String> excludedServiceIDs)
+ {
+ MultiDomainServerState result = new MultiDomainServerState();
+ // Initialize start state for all running domains with empty state
+ Iterator<ReplicationServerDomain> rsdk = this.getDomainIterator();
+ if (rsdk != null)
+ {
+ while (rsdk.hasNext())
+ {
+ // process a domain
+ ReplicationServerDomain rsd = rsdk.next();
+
+ if ((excludedServiceIDs!=null)
+ && (excludedServiceIDs.contains(rsd.getBaseDn())))
+ continue;
+
+ result.update(rsd.getBaseDn(), rsd.getEligibleState(
+ getEligibleCN()));
+ }
+ }
+ return result;
+ }
}
--
Gitblit v1.10.0