Class LdapStatistics

java.lang.Object
org.opends.server.protocols.ldap.LdapStatistics

public final class LdapStatistics extends Object
This class defines a data structure that will be used to keep track of various metrics related to LDAP communication that the server has conducted. The statistics that will be tracked include:
  • The total number of LDAP client connections accepted by the server.
  • The total number of LDAP client connections that have been closed.
  • The total number of LDAP messages read, both overall and broken down by message type.
  • The total number of LDAP messages written, both overall and broken down by message type.
  • The total number of bytes read from LDAP clients.
  • The total number of bytes written to LDAP clients.


This class may also be used in a hierarchical form if it is desirable to get specific and general statistics at the same time (e.g., information about the interaction with a specific client or aggregated for all clients).
  • Constructor Details

    • LdapStatistics

      public LdapStatistics()
  • Method Details

    • addAdditionalMeters

      public void addAdditionalMeters(MeterRegistryHolder registry)
      Computes LDAP statistics meters.
      Parameters:
      registry - registry where additional meters should be added.
    • updateConnect

      public void updateConnect()
      Increment the number of connections.
    • updateBytesRead

      public void updateBytesRead(int bytes)
      Increment the number of bytes read from the socket.
      Parameters:
      bytes - The bytes read.
    • updateBytesWritten

      public void updateBytesWritten(int bytes)
      Increment the number of bytes written to the socket.
      Parameters:
      bytes - The bytes written.
    • updateRequestRead

      public void updateRequestRead(Request request)
      Increment the number of requests read from the socket.
      Parameters:
      request - The request.
    • updateResultWritten

      public void updateResultWritten(RequestContext context, Request request, Result result)
      Increment the number of results written to the socket.
      Parameters:
      context - The request context.
      request - The request.
      result - The result.
    • getBytesRead

      public long getBytesRead()
      Returns the number of bytes that have been received from clients.
      Returns:
      the number of bytes that have been received from clients
    • getBytesWritten

      public long getBytesWritten()
      Returns the number of bytes that have been written to clients.
      Returns:
      the number of bytes that have been written to clients
    • getOperationsAbandoned

      public long getOperationsAbandoned()
      Returns the number of operations that have been abandoned by clients.
      Returns:
      the number of operations that have been abandoned by clients
    • getAbandonRequests

      public long getAbandonRequests()
      Returns the number of abandon requests that have been received.
      Returns:
      the number of abandon requests that have been received
    • getAddRequests

      public long getAddRequests()
      Returns the number of add requests that have been received.
      Returns:
      the number of add requests that have been received
    • getBindRequests

      public long getBindRequests()
      Returns the number of bind requests that have been received.
      Returns:
      the number of bind requests that have been received
    • getCompareRequests

      public long getCompareRequests()
      Returns the number of compare requests that have been received.
      Returns:
      the number of compare requests that have been received
    • getDeleteRequests

      public long getDeleteRequests()
      Returns the number of delete requests that have been received.
      Returns:
      the number of delete requests that have been received
    • getExtendedRequests

      public long getExtendedRequests()
      Returns the number of extended requests that have been received.
      Returns:
      the number of extended requests that have been received
    • getModifyRequests

      public long getModifyRequests()
      Returns the number of modify requests that have been received.
      Returns:
      the number of modify requests that have been received
    • getModifyDnRequests

      public long getModifyDnRequests()
      Returns the number of modify DN requests that have been received.
      Returns:
      the number of modify DN requests that have been received
    • getSearchRequests

      public long getSearchRequests()
      Returns the number of search requests that have been received.
      Returns:
      the number of search requests that have been received
    • getAllRequests

      public long getAllRequests()
      Returns the number of requests of all kind that have been received.
      Returns:
      the number of requests of all kind that have been received