mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
13.44.2006 528610c52f309c0fa3e5429224e106707f2cb07c
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,