From 06e8f819bcda0d7162d662af94c6ade794e1cfe6 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 08 Dec 2006 23:54:57 +0000
Subject: [PATCH] Update the backend API to provide a method for getting the number of entries contained in that backend. Also, create a new monitor entry for each registered backend that will report the backend ID, base DNs, writability mode, and entry count for that backend.
---
opends/src/server/org/opends/server/backends/task/TaskScheduler.java | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/backends/task/TaskScheduler.java b/opends/src/server/org/opends/server/backends/task/TaskScheduler.java
index 13a0de4..9472b79 100644
--- a/opends/src/server/org/opends/server/backends/task/TaskScheduler.java
+++ b/opends/src/server/org/opends/server/backends/task/TaskScheduler.java
@@ -1315,6 +1315,29 @@
/**
+ * Retrieves the total number of entries in the task backend.
+ *
+ * @return The total number of entries in the task backend.
+ */
+ public long getEntryCount()
+ {
+ assert debugEnter(CLASS_NAME, "getEntryCount");
+
+ schedulerLock.lock();
+
+ try
+ {
+ return tasks.size() + recurringTasks.size() + 3;
+ }
+ finally
+ {
+ schedulerLock.unlock();
+ }
+ }
+
+
+
+ /**
* Retrieves the root entry that is the common ancestor for all entries in the
* task backend.
*
--
Gitblit v1.10.0