Package com.unboundid.ldap.sdk
Class LDAPConnectionStatistics
- java.lang.Object
-
- com.unboundid.ldap.sdk.LDAPConnectionStatistics
-
- All Implemented Interfaces:
java.io.Serializable
@Mutable @ThreadSafety(level=MOSTLY_THREADSAFE) public final class LDAPConnectionStatistics extends java.lang.Object implements java.io.Serializable
This class provides a data structure with information about operations performed on an associated LDAP connection. Calls to update statistics maintained by this class are threadsafe, but attempts to access different statistics may not be consistent if other operations may be in progress on the connection.
The set of statistics maintained for connections:- The number of attempts made to establish the connection.
- The number of times the connection has been closed.
- The number of requests of each type that have been sent over the connection.
- The number of responses of each type that have been received over the connection.
- The average response time (in milliseconds or nanoseconds) for each type of operation processed on the connection.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LDAPConnectionStatistics()
Creates a new instance of this LDAP connection statistics object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getAverageAddResponseTimeMillis()
Retrieves the average response time in milliseconds for all add operations processed on the associated connection.double
getAverageAddResponseTimeNanos()
Retrieves the average response time in nanoseconds for all add operations processed on the associated connection.double
getAverageBindResponseTimeMillis()
Retrieves the average response time in milliseconds for all bind operations processed on the associated connection.double
getAverageBindResponseTimeNanos()
Retrieves the average response time in nanoseconds for all bind operations processed on the associated connection.double
getAverageCompareResponseTimeMillis()
Retrieves the average response time in milliseconds for all compare operations processed on the associated connection.double
getAverageCompareResponseTimeNanos()
Retrieves the average response time in nanoseconds for all compare operations processed on the associated connection.double
getAverageDeleteResponseTimeMillis()
Retrieves the average response time in milliseconds for all delete operations processed on the associated connection.double
getAverageDeleteResponseTimeNanos()
Retrieves the average response time in nanoseconds for all delete operations processed on the associated connection.double
getAverageExtendedResponseTimeMillis()
Retrieves the average response time in milliseconds for all extended operations processed on the associated connection.double
getAverageExtendedResponseTimeNanos()
Retrieves the average response time in nanoseconds for all extended operations processed on the associated connection.double
getAverageModifyDNResponseTimeMillis()
Retrieves the average response time in milliseconds for all modify DN operations processed on the associated connection.double
getAverageModifyDNResponseTimeNanos()
Retrieves the average response time in nanoseconds for all modify DN operations processed on the associated connection.double
getAverageModifyResponseTimeMillis()
Retrieves the average response time in milliseconds for all modify operations processed on the associated connection.double
getAverageModifyResponseTimeNanos()
Retrieves the average response time in nanoseconds for all modify operations processed on the associated connection.double
getAverageSearchResponseTimeMillis()
Retrieves the average response time in milliseconds for all search operations processed on the associated connection.double
getAverageSearchResponseTimeNanos()
Retrieves the average response time in nanoseconds for all search operations processed on the associated connection.long
getNumAbandonRequests()
Retrieves the number of abandon requests sent on the associated connection.long
getNumAddRequests()
Retrieves the number of add requests sent on the associated connection.long
getNumAddResponses()
Retrieves the number of add responses sent on the associated connection.long
getNumBindRequests()
Retrieves the number of bind requests sent on the associated connection.long
getNumBindResponses()
Retrieves the number of bind responses sent on the associated connection.long
getNumCompareRequests()
Retrieves the number of compare requests sent on the associated connection.long
getNumCompareResponses()
Retrieves the number of compare responses sent on the associated connection.long
getNumConnects()
Retrieves the number of times an attempt has been made to establish the associated connection.long
getNumDeleteRequests()
Retrieves the number of delete requests sent on the associated connection.long
getNumDeleteResponses()
Retrieves the number of delete responses sent on the associated connection.long
getNumDisconnects()
Retrieves the number of times the associated connection has been terminated.long
getNumExtendedRequests()
Retrieves the number of extended requests sent on the associated connection.long
getNumExtendedResponses()
Retrieves the number of extended responses sent on the associated connection.long
getNumModifyDNRequests()
Retrieves the number of modify DN requests sent on the associated connection.long
getNumModifyDNResponses()
Retrieves the number of modify DN responses sent on the associated connection.long
getNumModifyRequests()
Retrieves the number of modify requests sent on the associated connection.long
getNumModifyResponses()
Retrieves the number of modify responses sent on the associated connection.long
getNumSearchDoneResponses()
Retrieves the number of search result done responses received on the associated connection.long
getNumSearchEntryResponses()
Retrieves the number of search result entry responses received on the associated connection.long
getNumSearchReferenceResponses()
Retrieves the number of search result reference responses received on the associated connection.long
getNumSearchRequests()
Retrieves the number of search requests sent on the associated connection.long
getNumUnbindRequests()
Retrieves the number of unbind requests sent on the associated connection.long
getTotalAddResponseTimeMillis()
Retrieves the total response time in milliseconds for all add operations processed on the associated connection.long
getTotalAddResponseTimeNanos()
Retrieves the total response time in nanoseconds for all add operations processed on the associated connection.long
getTotalBindResponseTimeMillis()
Retrieves the total response time in milliseconds for all bind operations processed on the associated connection.long
getTotalBindResponseTimeNanos()
Retrieves the total response time in nanoseconds for all bind operations processed on the associated connection.long
getTotalCompareResponseTimeMillis()
Retrieves the total response time in milliseconds for all compare operations processed on the associated connection.long
getTotalCompareResponseTimeNanos()
Retrieves the total response time in nanoseconds for all compare operations processed on the associated connection.long
getTotalDeleteResponseTimeMillis()
Retrieves the total response time in milliseconds for all delete operations processed on the associated connection.long
getTotalDeleteResponseTimeNanos()
Retrieves the total response time in nanoseconds for all delete operations processed on the associated connection.long
getTotalExtendedResponseTimeMillis()
Retrieves the total response time in milliseconds for all extended operations processed on the associated connection.long
getTotalExtendedResponseTimeNanos()
Retrieves the total response time in nanoseconds for all extended operations processed on the associated connection.long
getTotalModifyDNResponseTimeMillis()
Retrieves the total response time in milliseconds for all modify DN operations processed on the associated connection.long
getTotalModifyDNResponseTimeNanos()
Retrieves the total response time in nanoseconds for all modify DN operations processed on the associated connection.long
getTotalModifyResponseTimeMillis()
Retrieves the total response time in milliseconds for all modify operations processed on the associated connection.long
getTotalModifyResponseTimeNanos()
Retrieves the total response time in nanoseconds for all modify operations processed on the associated connection.long
getTotalSearchResponseTimeMillis()
Retrieves the total response time in milliseconds for all search operations processed on the associated connection.long
getTotalSearchResponseTimeNanos()
Retrieves the total response time in nanoseconds for all search operations processed on the associated connection.void
reset()
Resets all counters back to zero.java.lang.String
toString()
Retrieves a string representation of this LDAP connection statistics object.void
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP connection statistics object to the provided buffer.
-
-
-
Constructor Detail
-
LDAPConnectionStatistics
public LDAPConnectionStatistics()
Creates a new instance of this LDAP connection statistics object. All of the counts will be initialized to zero.
-
-
Method Detail
-
reset
public void reset()
Resets all counters back to zero.
-
getNumConnects
public long getNumConnects()
Retrieves the number of times an attempt has been made to establish the associated connection.- Returns:
- The number of times an attempt has been made to establish the associated connection.
-
getNumDisconnects
public long getNumDisconnects()
Retrieves the number of times the associated connection has been terminated. Note that this may exceed the number of connection attempts because there may be cases in which an attempt is made to close a connection after it has already been closed or otherwise disconnected.- Returns:
- The number of times the associated connection has been terminated.
-
getNumAbandonRequests
public long getNumAbandonRequests()
Retrieves the number of abandon requests sent on the associated connection.- Returns:
- The number of abandon requests sent on the associated connection.
-
getNumAddRequests
public long getNumAddRequests()
Retrieves the number of add requests sent on the associated connection.- Returns:
- The number of add requests sent on the associated connection.
-
getNumAddResponses
public long getNumAddResponses()
Retrieves the number of add responses sent on the associated connection.- Returns:
- The number of add responses sent on the associated connection.
-
getTotalAddResponseTimeNanos
public long getTotalAddResponseTimeNanos()
Retrieves the total response time in nanoseconds for all add operations processed on the associated connection.- Returns:
- The total response time in nanoseconds for all add operations processed on the associated connection.
-
getTotalAddResponseTimeMillis
public long getTotalAddResponseTimeMillis()
Retrieves the total response time in milliseconds for all add operations processed on the associated connection.- Returns:
- The total response time in milliseconds for all add operations processed on the associated connection.
-
getAverageAddResponseTimeNanos
public double getAverageAddResponseTimeNanos()
Retrieves the average response time in nanoseconds for all add operations processed on the associated connection.- Returns:
- The average response time in nanoseconds for all add operations
processed on the associated connection, or
Double.NaN
if no add operations have yet been performed.
-
getAverageAddResponseTimeMillis
public double getAverageAddResponseTimeMillis()
Retrieves the average response time in milliseconds for all add operations processed on the associated connection.- Returns:
- The average response time in milliseconds for all add operations
processed on the associated connection, or
Double.NaN
if no add operations have yet been performed.
-
getNumBindRequests
public long getNumBindRequests()
Retrieves the number of bind requests sent on the associated connection.- Returns:
- The number of bind requests sent on the associated connection.
-
getNumBindResponses
public long getNumBindResponses()
Retrieves the number of bind responses sent on the associated connection.- Returns:
- The number of bind responses sent on the associated connection.
-
getTotalBindResponseTimeNanos
public long getTotalBindResponseTimeNanos()
Retrieves the total response time in nanoseconds for all bind operations processed on the associated connection.- Returns:
- The total response time in nanoseconds for all bind operations processed on the associated connection.
-
getTotalBindResponseTimeMillis
public long getTotalBindResponseTimeMillis()
Retrieves the total response time in milliseconds for all bind operations processed on the associated connection.- Returns:
- The total response time in milliseconds for all bind operations processed on the associated connection.
-
getAverageBindResponseTimeNanos
public double getAverageBindResponseTimeNanos()
Retrieves the average response time in nanoseconds for all bind operations processed on the associated connection.- Returns:
- The average response time in nanoseconds for all bind operations
processed on the associated connection, or
Double.NaN
if no bind operations have yet been performed.
-
getAverageBindResponseTimeMillis
public double getAverageBindResponseTimeMillis()
Retrieves the average response time in milliseconds for all bind operations processed on the associated connection.- Returns:
- The average response time in milliseconds for all bind operations
processed on the associated connection, or
Double.NaN
if no bind operations have yet been performed.
-
getNumCompareRequests
public long getNumCompareRequests()
Retrieves the number of compare requests sent on the associated connection.- Returns:
- The number of compare requests sent on the associated connection.
-
getNumCompareResponses
public long getNumCompareResponses()
Retrieves the number of compare responses sent on the associated connection.- Returns:
- The number of compare responses sent on the associated connection.
-
getTotalCompareResponseTimeNanos
public long getTotalCompareResponseTimeNanos()
Retrieves the total response time in nanoseconds for all compare operations processed on the associated connection.- Returns:
- The total response time in nanoseconds for all compare operations processed on the associated connection.
-
getTotalCompareResponseTimeMillis
public long getTotalCompareResponseTimeMillis()
Retrieves the total response time in milliseconds for all compare operations processed on the associated connection.- Returns:
- The total response time in milliseconds for all compare operations processed on the associated connection.
-
getAverageCompareResponseTimeNanos
public double getAverageCompareResponseTimeNanos()
Retrieves the average response time in nanoseconds for all compare operations processed on the associated connection.- Returns:
- The average response time in nanoseconds for all compare
operations processed on the associated connection, or
Double.NaN
if no compare operations have yet been performed.
-
getAverageCompareResponseTimeMillis
public double getAverageCompareResponseTimeMillis()
Retrieves the average response time in milliseconds for all compare operations processed on the associated connection.- Returns:
- The average response time in milliseconds for all compare
operations processed on the associated connection, or
Double.NaN
if no compare operations have yet been performed.
-
getNumDeleteRequests
public long getNumDeleteRequests()
Retrieves the number of delete requests sent on the associated connection.- Returns:
- The number of delete requests sent on the associated connection.
-
getNumDeleteResponses
public long getNumDeleteResponses()
Retrieves the number of delete responses sent on the associated connection.- Returns:
- The number of delete responses sent on the associated connection.
-
getTotalDeleteResponseTimeNanos
public long getTotalDeleteResponseTimeNanos()
Retrieves the total response time in nanoseconds for all delete operations processed on the associated connection.- Returns:
- The total response time in nanoseconds for all delete operations processed on the associated connection.
-
getTotalDeleteResponseTimeMillis
public long getTotalDeleteResponseTimeMillis()
Retrieves the total response time in milliseconds for all delete operations processed on the associated connection.- Returns:
- The total response time in milliseconds for all delete operations processed on the associated connection.
-
getAverageDeleteResponseTimeNanos
public double getAverageDeleteResponseTimeNanos()
Retrieves the average response time in nanoseconds for all delete operations processed on the associated connection.- Returns:
- The average response time in nanoseconds for all delete
operations processed on the associated connection, or
Double.NaN
if no delete operations have yet been performed.
-
getAverageDeleteResponseTimeMillis
public double getAverageDeleteResponseTimeMillis()
Retrieves the average response time in milliseconds for all delete operations processed on the associated connection.- Returns:
- The average response time in milliseconds for all delete
operations processed on the associated connection, or
Double.NaN
if no delete operations have yet been performed.
-
getNumExtendedRequests
public long getNumExtendedRequests()
Retrieves the number of extended requests sent on the associated connection.- Returns:
- The number of extended requests sent on the associated connection.
-
getNumExtendedResponses
public long getNumExtendedResponses()
Retrieves the number of extended responses sent on the associated connection.- Returns:
- The number of extended responses sent on the associated connection.
-
getTotalExtendedResponseTimeNanos
public long getTotalExtendedResponseTimeNanos()
Retrieves the total response time in nanoseconds for all extended operations processed on the associated connection.- Returns:
- The total response time in nanoseconds for all extended operations processed on the associated connection.
-
getTotalExtendedResponseTimeMillis
public long getTotalExtendedResponseTimeMillis()
Retrieves the total response time in milliseconds for all extended operations processed on the associated connection.- Returns:
- The total response time in milliseconds for all extended operations processed on the associated connection.
-
getAverageExtendedResponseTimeNanos
public double getAverageExtendedResponseTimeNanos()
Retrieves the average response time in nanoseconds for all extended operations processed on the associated connection.- Returns:
- The average response time in nanoseconds for all extended
operations processed on the associated connection, or
Double.NaN
if no extended operations have yet been performed.
-
getAverageExtendedResponseTimeMillis
public double getAverageExtendedResponseTimeMillis()
Retrieves the average response time in milliseconds for all extended operations processed on the associated connection.- Returns:
- The average response time in milliseconds for all extended
operations processed on the associated connection, or
Double.NaN
if no extended operations have yet been performed.
-
getNumModifyRequests
public long getNumModifyRequests()
Retrieves the number of modify requests sent on the associated connection.- Returns:
- The number of modify requests sent on the associated connection.
-
getNumModifyResponses
public long getNumModifyResponses()
Retrieves the number of modify responses sent on the associated connection.- Returns:
- The number of modify responses sent on the associated connection.
-
getTotalModifyResponseTimeNanos
public long getTotalModifyResponseTimeNanos()
Retrieves the total response time in nanoseconds for all modify operations processed on the associated connection.- Returns:
- The total response time in nanoseconds for all modify operations processed on the associated connection.
-
getTotalModifyResponseTimeMillis
public long getTotalModifyResponseTimeMillis()
Retrieves the total response time in milliseconds for all modify operations processed on the associated connection.- Returns:
- The total response time in milliseconds for all modify operations processed on the associated connection.
-
getAverageModifyResponseTimeNanos
public double getAverageModifyResponseTimeNanos()
Retrieves the average response time in nanoseconds for all modify operations processed on the associated connection.- Returns:
- The average response time in nanoseconds for all modify
operations processed on the associated connection, or
Double.NaN
if no modify operations have yet been performed.
-
getAverageModifyResponseTimeMillis
public double getAverageModifyResponseTimeMillis()
Retrieves the average response time in milliseconds for all modify operations processed on the associated connection.- Returns:
- The average response time in milliseconds for all modify
operations processed on the associated connection, or
Double.NaN
if no modify operations have yet been performed.
-
getNumModifyDNRequests
public long getNumModifyDNRequests()
Retrieves the number of modify DN requests sent on the associated connection.- Returns:
- The number of modify DN requests sent on the associated connection.
-
getNumModifyDNResponses
public long getNumModifyDNResponses()
Retrieves the number of modify DN responses sent on the associated connection.- Returns:
- The number of modify DN responses sent on the associated connection.
-
getTotalModifyDNResponseTimeNanos
public long getTotalModifyDNResponseTimeNanos()
Retrieves the total response time in nanoseconds for all modify DN operations processed on the associated connection.- Returns:
- The total response time in nanoseconds for all modify DN operations processed on the associated connection.
-
getTotalModifyDNResponseTimeMillis
public long getTotalModifyDNResponseTimeMillis()
Retrieves the total response time in milliseconds for all modify DN operations processed on the associated connection.- Returns:
- The total response time in milliseconds for all modify DN operations processed on the associated connection.
-
getAverageModifyDNResponseTimeNanos
public double getAverageModifyDNResponseTimeNanos()
Retrieves the average response time in nanoseconds for all modify DN operations processed on the associated connection.- Returns:
- The average response time in nanoseconds for all modify DN
operations processed on the associated connection, or
Double.NaN
if no modify DN operations have yet been performed.
-
getAverageModifyDNResponseTimeMillis
public double getAverageModifyDNResponseTimeMillis()
Retrieves the average response time in milliseconds for all modify DN operations processed on the associated connection.- Returns:
- The average response time in milliseconds for all modify DN
operations processed on the associated connection, or
Double.NaN
if no modify DN operations have yet been performed.
-
getNumSearchRequests
public long getNumSearchRequests()
Retrieves the number of search requests sent on the associated connection.- Returns:
- The number of search requests sent on the associated connection.
-
getNumSearchEntryResponses
public long getNumSearchEntryResponses()
Retrieves the number of search result entry responses received on the associated connection.- Returns:
- The number of search result entry responses received on the associated connection.
-
getNumSearchReferenceResponses
public long getNumSearchReferenceResponses()
Retrieves the number of search result reference responses received on the associated connection.- Returns:
- The number of search result reference responses received on the associated connection.
-
getNumSearchDoneResponses
public long getNumSearchDoneResponses()
Retrieves the number of search result done responses received on the associated connection.- Returns:
- The number of search result done responses received on the associated connection.
-
getTotalSearchResponseTimeNanos
public long getTotalSearchResponseTimeNanos()
Retrieves the total response time in nanoseconds for all search operations processed on the associated connection.- Returns:
- The total response time in nanoseconds for all search operations processed on the associated connection.
-
getTotalSearchResponseTimeMillis
public long getTotalSearchResponseTimeMillis()
Retrieves the total response time in milliseconds for all search operations processed on the associated connection.- Returns:
- The total response time in milliseconds for all search operations processed on the associated connection.
-
getAverageSearchResponseTimeNanos
public double getAverageSearchResponseTimeNanos()
Retrieves the average response time in nanoseconds for all search operations processed on the associated connection.- Returns:
- The average response time in nanoseconds for all search
operations processed on the associated connection, or
Double.NaN
if no compare operations have yet been performed.
-
getAverageSearchResponseTimeMillis
public double getAverageSearchResponseTimeMillis()
Retrieves the average response time in milliseconds for all search operations processed on the associated connection.- Returns:
- The average response time in milliseconds for all search
operations processed on the associated connection, or
Double.NaN
if no compare operations have yet been performed.
-
getNumUnbindRequests
public long getNumUnbindRequests()
Retrieves the number of unbind requests sent on the associated connection.- Returns:
- The number of unbind requests sent on the associated connection.
-
toString
@NotNull public java.lang.String toString()
Retrieves a string representation of this LDAP connection statistics object.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of this LDAP connection statistics object.
-
-