From 528610c52f309c0fa3e5429224e106707f2cb07c Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Wed, 13 Dec 2006 00:44:34 +0000
Subject: [PATCH] Update the backend monitor entries to include a ds-backend-is-private attribute which indicates whether the associated backend is registered as a private backend.
---
opends/src/server/org/opends/server/monitors/BackendMonitor.java | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/monitors/BackendMonitor.java b/opends/src/server/org/opends/server/monitors/BackendMonitor.java
index eb910e1..4eb7e8a 100644
--- a/opends/src/server/org/opends/server/monitors/BackendMonitor.java
+++ b/opends/src/server/org/opends/server/monitors/BackendMonitor.java
@@ -35,6 +35,7 @@
import org.opends.server.api.Backend;
import org.opends.server.api.MonitorProvider;
import org.opends.server.config.ConfigEntry;
+import org.opends.server.schema.BooleanSyntax;
import org.opends.server.types.Attribute;
import org.opends.server.types.AttributeType;
import org.opends.server.types.AttributeValue;
@@ -73,6 +74,9 @@
// The attribute type that will be used to report the number of entries.
private AttributeType entryCountType;
+ // The attribute type that will be used to indicate if a backend is private.
+ private AttributeType isPrivateType;
+
// The attribute type that will be used to report the writability mode.
private AttributeType writabilityModeType;
@@ -122,6 +126,10 @@
DirectoryConfig.getAttributeType(ATTR_MONITOR_BACKEND_ENTRY_COUNT,
true);
+ isPrivateType =
+ DirectoryConfig.getAttributeType(ATTR_MONITOR_BACKEND_IS_PRIVATE,
+ true);
+
writabilityModeType =
DirectoryConfig.getAttributeType(ATTR_MONITOR_BACKEND_WRITABILITY_MODE,
true);
@@ -206,6 +214,11 @@
attrs.add(new Attribute(baseDNType, ATTR_MONITOR_BACKEND_BASE_DN, values));
values = new LinkedHashSet<AttributeValue>();
+ values.add(BooleanSyntax.createBooleanValue(backend.isPrivateBackend()));
+ attrs.add(new Attribute(isPrivateType, ATTR_MONITOR_BACKEND_IS_PRIVATE,
+ values));
+
+ values = new LinkedHashSet<AttributeValue>();
values.add(new AttributeValue(entryCountType,
ByteStringFactory.create(String.valueOf(backend.getEntryCount()))));
attrs.add(new Attribute(entryCountType, ATTR_MONITOR_BACKEND_ENTRY_COUNT,
--
Gitblit v1.10.0