From 9a72955d0b08a0a1b3116d9eaba993c77c84d8c1 Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Mon, 22 Oct 2007 21:47:06 +0000
Subject: [PATCH] Added the ability to retrieve the number of entries in the entire subordinate subtree to the numSubordinates method in the backend API. Changed the replication code to use numSubordinates of the entires subtree to determine how many entries will be exported and imported during initialization.

---
 opends/src/server/org/opends/server/backends/MonitorBackend.java |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/MonitorBackend.java b/opends/src/server/org/opends/server/backends/MonitorBackend.java
index 100c3ad..504e064 100644
--- a/opends/src/server/org/opends/server/backends/MonitorBackend.java
+++ b/opends/src/server/org/opends/server/backends/MonitorBackend.java
@@ -373,7 +373,7 @@
   public ConditionResult hasSubordinates(DN entryDN)
          throws DirectoryException
   {
-    long ret = numSubordinates(entryDN);
+    long ret = numSubordinates(entryDN, false);
     if(ret < 0)
     {
       return ConditionResult.UNDEFINED;
@@ -394,7 +394,7 @@
    * {@inheritDoc}
    */
   @Override()
-  public long numSubordinates(DN entryDN)
+  public long numSubordinates(DN entryDN, boolean subtree)
          throws DirectoryException
   {
     // If the requested entry was null, then return undefined.
@@ -408,6 +408,8 @@
     // the number of monitor providers.
     if (entryDN.equals(baseMonitorDN))
     {
+      // This backend is only 1 level deep so the count is the same for
+      // subtree and immediate subordinates.
       return DirectoryServer.getMonitorProviders().size();
     }
 

--
Gitblit v1.10.0