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

Chris Ridd
30.43.2012 05e35e96d043f7ac2715aebb60351335693bb4b9
opendj-sdk/opends/src/snmp/src/org/opends/server/snmp/DsApplIfOpsEntryImpl.java
@@ -23,6 +23,8 @@
 *
 *
 *      Copyright 2008 Sun Microsystems, Inc.
 *      Portions Copyright 2012 ForgeRock AS
 *
 */
package org.opends.server.snmp;
@@ -133,6 +135,46 @@
  /**
   * {@inheritDoc}
   * @return DsApplIfOneLevelSearchOps
   */
  @Override
  public Long getDsApplIfOneLevelSearchOps() {
    if (stats == null) {
      stats = this.monitor.getConnectionHandlerStatistics(
              connectionHandlerName);
    }
    if (stats != null) {
      long value = Long.parseLong((String) this.monitor.getAttribute(stats,
              "searchOneRequests"));
      return SNMPMonitor.counter32Value(value);
    } else {
      return 0L;
    }
  }
  /**
   * {@inheritDoc}
   * @return DsApplIfWholeSubtreeSearchOps
   */
  @Override
  public Long getDsApplIfWholeSubtreeSearchOps() {
    if (stats == null) {
      stats = this.monitor.getConnectionHandlerStatistics(
              connectionHandlerName);
    }
    if (stats != null) {
      long value = Long.parseLong((String) this.monitor.getAttribute(stats,
              "searchSubRequests"));
      return SNMPMonitor.counter32Value(value);
    } else {
      return 0L;
    }
  }
  /**
   * {@inheritDoc}
   * @return DsApplIfModifyRDNOps
   */
  @Override