Class LDAPConnectionPoolStatistics

java.lang.Object
com.unboundid.ldap.sdk.LDAPConnectionPoolStatistics
All Implemented Interfaces:
Serializable

This class provides a data structure with information about usage of an LDAP connection pool. Calls to update statistics maintained by this class are threadsafe, but attempts to access different statistics may not be consistent if operations may be in progress in the connection pool.

The set of statistics maintained for connection pools include:
  • The current number of connections that are available within the pool.
  • The maximum number of connections that may be available within the pool.
  • The total number of connections that have been successfully checked out of the pool.
  • The number of connections that have been successfully checked out of of the pool without needing to wait for a connection to become available.
  • The number of connections that have been successfully checked out of the pool after waiting for a connection to become available.
  • The number of connections that have been successfully checked out of the pool after creating a new connection to service the request.
  • The number of failed attempts to check a connection out of the pool.
  • The number of connections that have been released back to the pool as valid.
  • The number of connections that have been closed as defunct.
  • The number of connections that have been closed as expired (i.e., that had been established for the maximum connection age).
  • The number of connections that have been closed as unneeded (because the pool already had the maximum number of available connections).
  • The number of successful attempts to create a new connection for use in the pool.
  • The number of failed attempts to create a new connection for use in the pool.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance of this LDAP connection pool statistics object.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Retrieves the maximum number of connections that may be available in the pool at any time, if that information is available.
    int
    Retrieves the number of connections currently available for use in the pool, if that information is available.
    long
    Retrieves the number of connections that have been closed as defunct (i.e., they are no longer believed to be valid).
    long
    Retrieves the number of connections that have been closed as expired (i.e., they have been established for longer than the maximum connection age for the pool).
    long
    Retrieves the number of connections that have been closed as unneeded (i.e., they were created in response to heavy load but are no longer needed to meet the current load, or they were closed when the pool was closed).
    long
    Retrieves the number of failed attempts to check out a connection from the pool (including connections checked out for internal use by operations processed as part of the pool).
    long
    Retrieves the number of failed attempts to create a connection for use in the connection pool.
    long
    Retrieves the number of times a valid, usable connection has been released back to the pool after being checked out (including connections checked out for internal use by operations processed within the pool).
    long
    Retrieves the number of successful attempts to check out a connection from the pool (including connections checked out for internal use by operations processed as part of the pool).
    long
    Retrieves the number of successful attempts to check out a connection from the pool that had to wait for a connection to become available.
    long
    Retrieves the number of successful attempts to check out a connection from the pool that had to create a new connection because no existing connections were available.
    long
    Retrieves the number of successful attempts to check out a connection from the pool that were able to obtain an existing connection without waiting.
    long
    Retrieves the number of connections that have been successfully created for use in conjunction with the connection pool.
    void
    Resets all counters back to zero.
    Retrieves a string representation of this LDAP connection pool statistics object.
    void
    Appends a string representation of this LDAP connection pool statistics object to the provided buffer.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • LDAPConnectionPoolStatistics

      Creates a new instance of this LDAP connection pool statistics object. All of the counts will be initialized to zero.
      Parameters:
      pool - The connection pool with which these statistics are associated.
  • Method Details

    • reset

      public void reset()
      Resets all counters back to zero.
    • getNumSuccessfulConnectionAttempts

      Retrieves the number of connections that have been successfully created for use in conjunction with the connection pool.
      Returns:
      The number of connections that have been created for use in conjunction with the connection pool.
    • getNumFailedConnectionAttempts

      Retrieves the number of failed attempts to create a connection for use in the connection pool.
      Returns:
      The number of failed attempts to create a connection for use in the connection pool.
    • getNumConnectionsClosedDefunct

      Retrieves the number of connections that have been closed as defunct (i.e., they are no longer believed to be valid).
      Returns:
      The number of connections that have been closed as defunct.
    • getNumConnectionsClosedExpired

      Retrieves the number of connections that have been closed as expired (i.e., they have been established for longer than the maximum connection age for the pool).
      Returns:
      The number of connections that have been closed as expired.
    • getNumConnectionsClosedUnneeded

      Retrieves the number of connections that have been closed as unneeded (i.e., they were created in response to heavy load but are no longer needed to meet the current load, or they were closed when the pool was closed).
      Returns:
      The number of connections that have been closed as unneeded.
    • getNumSuccessfulCheckouts

      Retrieves the number of successful attempts to check out a connection from the pool (including connections checked out for internal use by operations processed as part of the pool).
      Returns:
      The number of successful attempts to check out a connection from the pool.
    • getNumSuccessfulCheckoutsWithoutWaiting

      Retrieves the number of successful attempts to check out a connection from the pool that were able to obtain an existing connection without waiting.
      Returns:
      The number of successful attempts to check out a connection from the pool that were able to obtain an existing connection without waiting.
    • getNumSuccessfulCheckoutsAfterWaiting

      Retrieves the number of successful attempts to check out a connection from the pool that had to wait for a connection to become available.
      Returns:
      The number of successful attempts to check out a connection from the pool that had to wait for a connection to become available.
    • getNumSuccessfulCheckoutsNewConnection

      Retrieves the number of successful attempts to check out a connection from the pool that had to create a new connection because no existing connections were available.
      Returns:
      The number of successful attempts to check out a connection from the pool that had to create a new connection because no existing connections were available.
    • getNumFailedCheckouts

      public long getNumFailedCheckouts()
      Retrieves the number of failed attempts to check out a connection from the pool (including connections checked out for internal use by operations processed as part of the pool).
      Returns:
      The number of failed attempts to check out a connection from the pool.
    • getNumReleasedValid

      public long getNumReleasedValid()
      Retrieves the number of times a valid, usable connection has been released back to the pool after being checked out (including connections checked out for internal use by operations processed within the pool).
      Returns:
      The number of times a valid connection has been released back to the pool.
    • getNumAvailableConnections

      Retrieves the number of connections currently available for use in the pool, if that information is available.
      Returns:
      The number of connections currently available for use in the pool, or -1 if that is not applicable for the associated connection pool implementation.
    • getMaximumAvailableConnections

      Retrieves the maximum number of connections that may be available in the pool at any time, if that information is available.
      Returns:
      The maximum number of connections that may be available in the pool at any time, or -1 if that is not applicable for the associated connection pool implementation.
    • toString

      Retrieves a string representation of this LDAP connection pool statistics object.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this LDAP connection pool statistics object.
    • toString

      public void toString(@NotNull StringBuilder buffer)
      Appends a string representation of this LDAP connection pool statistics object to the provided buffer.
      Parameters:
      buffer - The buffer to which the string representation should be appended.