From 8e41745b17b37a2a508ba6a016eddf9c6f219125 Mon Sep 17 00:00:00 2001
From: pgamba <pgamba@localhost>
Date: Tue, 13 Nov 2007 15:45:42 +0000
Subject: [PATCH] Fix 2588 - ReplicationBackend.getEntryCount() very inefficient
---
opends/src/server/org/opends/server/replication/server/ReplicationCache.java | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/ReplicationCache.java b/opends/src/server/org/opends/server/replication/server/ReplicationCache.java
index 89140e9..d27d11f 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationCache.java
+++ b/opends/src/server/org/opends/server/replication/server/ReplicationCache.java
@@ -531,6 +531,21 @@
}
/**
+ * Returns the change count for that ReplicationCache.
+ *
+ * @return the change count.
+ */
+ public long getChangesCount()
+ {
+ long entryCount = 0;
+ for (DbHandler dbHandler : sourceDbHandlers.values())
+ {
+ entryCount += dbHandler.getChangesCount();
+ }
+ return entryCount;
+ }
+
+ /**
* Get the baseDn.
* @return Returns the baseDn.
*/
--
Gitblit v1.10.0