Class PruneUnneededConnectionsLDAPConnectionPoolHealthCheck

    • Constructor Detail

      • PruneUnneededConnectionsLDAPConnectionPoolHealthCheck

        public PruneUnneededConnectionsLDAPConnectionPoolHealthCheck​(int minAvailableConnections,
                                                                     long minDurationMillisExceedingMinAvailableConnections)
        Creates a new instance of this LDAP connection pool health check with the provided information.
        Parameters:
        minAvailableConnections - The minimum number of connections that should be maintained in the connection pool. This health check will only remove connections if the pool has more than this number of connections for at least the specified duration. A value that is less than or equal to zero indicates that no minimum number of connections needs to be maintained.
        minDurationMillisExceedingMinAvailableConnections - The minimum length of time in milliseconds that the pool should have reported at least the specified minimum number of available connections before any connections may be removed. Note that the number of connections will only be checked at intervals specified by the AbstractConnectionPool.getHealthCheckIntervalMillis() method, so it may be possible for the number of available connections to dip below this value one or more time between intervals and still cause the pool to be reduced in size. A value that is less than or equal to zero indicates that the pool size should be reduced to the configured minimum any time there are more than that number of connections available.
    • Method Detail

      • getMinAvailableConnections

        public int getMinAvailableConnections()
        Retrieves the minimum number of connections that should be maintained in the connection pool. This health check will only remove connections if the pool has more than this number of connections for at least the specified duration.
        Returns:
        The minimum number of connections that should be maintained in the connection pool.
      • getMinDurationMillisExceedingMinAvailableConnections

        public long getMinDurationMillisExceedingMinAvailableConnections()
        Retrieves the minimum length of time in milliseconds that the pool should have reported at least the specified minimum number of available connections before any connections may be removed. Note that the number of connections will only be checked at intervals specified by the AbstractConnectionPool.getHealthCheckIntervalMillis() method, so it may be possible for the number of available connections to dip below this value one or more time between intervals and still cause the pool to be reduced in size.
        Returns:
        The minimum length of time in milliseconds that the pool should have reported at least the specified minimum number of available connections before any connections may be removed.
      • toString

        public void toString​(java.lang.StringBuilder buffer)
        Appends a string representation of this LDAP connection pool health check to the provided buffer.
        Overrides:
        toString in class LDAPConnectionPoolHealthCheck
        Parameters:
        buffer - The buffer to which the information should be appended.