Class PooledReferralConnectorProperties

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      BindRequest getBindRequest()
      Retrieves the bind request that should be used to authenticate pooled connections, if defined.
      LDAPConnectionOptions getConnectionOptions()
      Retrieves the set of options that will be used when establishing new pooled connections for the purpose of following referrals.
      LDAPConnectionPoolHealthCheck getHealthCheck()
      Retrieves the health check that should be used to determine whether pooled connections are still valid.
      long getHealthCheckIntervalMillis()
      Retrieves the length of time in milliseconds between background health checks performed against pooled connections.
      int getInitialConnectionsPerPool()
      Retrieves the initial number of connections to establish when creating a new connection pool for the purpose of following referrals.
      PooledReferralConnectorLDAPURLSecurityType getLDAPURLSecurityType()
      Indicates the type of communication security that the referral connector should use when creating connections for referral URLs with a scheme of "ldap".
      long getMaximumConnectionAgeMillis()
      Retrieves the maximum length of time in milliseconds that each pooled connection may remain established.
      int getMaximumConnectionsPerPool()
      Retrieves the maximum number of idle connections that the server should maintain in each connection pool used for following referrals.
      long getMaximumPoolAgeMillis()
      Retrieves the maximum length of time in milliseconds that a connection pool created for the purpose of following referrals should be retained, regardless of how often it is used.
      long getMaximumPoolIdleDurationMillis()
      Retrieves the maximum length of time in milliseconds that a connection pool created for the purpose of following referrals should be retained after its most recent use.
      javax.net.ssl.SSLSocketFactory getSSLSocketFactory()
      Retrieves the SSL socket factory that will be used when performing TLS negotiation on any new connections created for the purpose of following referrals.
      boolean retryFailedOperationsDueToInvalidConnections()
      Indicates whether the connection pools should be configured to automatically retry an operation on a newly established connection if the initial attempt fails in a manner that suggests that the connection may no longer be valid.
      void setBindRequest​(BindRequest bindRequest)
      Specifies the bind request that should be used to authenticate pooled connections.
      void setConnectionOptions​(LDAPConnectionOptions connectionOptions)
      Specifies the set of options that will be used when establishing new pooled connections for the purpose of following referrals.
      void setHealthCheck​(LDAPConnectionPoolHealthCheck healthCheck)
      Specifies the health check that should be used to determine whether pooled connections are still valid.
      void setHealthCheckIntervalMillis​(long healthCheckIntervalMillis)
      Specifies the length of time in milliseconds between background health checks performed against pooled connections.
      void setInitialConnectionsPerPool​(int initialConnectionsPerPool)
      Specifies the initial number of connections to establish when creating a new connection pool for the purpose of following referrals.
      void setLDAPURLSecurityType​(PooledReferralConnectorLDAPURLSecurityType ldapURLSecurityType)
      Specifies the type of communication security that the referral connector should use when creating connections for referral URLs with a scheme of "ldap".
      void setMaximumConnectionAgeMillis​(long maximumConnectionAgeMillis)
      Specifies the maximum length of time in milliseconds that each pooled connection may remain established.
      void setMaximumConnectionsPerPool​(int maximumConnectionsPerPool)
      Specifies the maximum number of idle connections that the server should maintain in each connection pool used for following referrals.
      void setMaximumPoolAgeMillis​(long maximumPoolAgeMillis)
      Specifies the maximum length of time in milliseconds that a connection pool created for the purpose of following referrals should be retained, regardless of how often it is used.
      void setMaximumPoolIdleDurationMillis​(long maximumPoolIdleDurationMillis)
      Specifies the maximum length of time in milliseconds that a connection pool created for the purpose of following referrals should be retained after its most recent use.
      void setRetryFailedOperationsDueToInvalidConnections​(boolean retryFailedOperationsDueToInvalidConnections)
      Specifies whether the connection pools should be configured to automatically retry an operation on a newly established connection if the initial attempt fails in a manner that suggests that the connection may no longer be valid.
      void setSSLSocketFactory​(javax.net.ssl.SSLSocketFactory sslSocketFactory)
      Specifies the SSL socket factory that will be used when performing TLS negotiation on any new connections created for the purpose of following referrals.
      java.lang.String toString()
      Retrieves a string representation of the pooled referral connector properties.
      void toString​(java.lang.StringBuilder buffer)
      Appends a string representation of the pooled referral connector properties to the provided buffer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getInitialConnectionsPerPool

        public int getInitialConnectionsPerPool()
        Retrieves the initial number of connections to establish when creating a new connection pool for the purpose of following referrals. By default, only a single connection will be established.
        Returns:
        The initial number of connections to establish when creating a new connection pool for the purpose of following referrals.
      • setInitialConnectionsPerPool

        public void setInitialConnectionsPerPool​(int initialConnectionsPerPool)
        Specifies the initial number of connections to establish when creating a new connection pool for the purpose of following referrals. By default, only a single connection will be established.
        Parameters:
        initialConnectionsPerPool - The initial number of connections to establish when creating a new connection pool for the purpose of following referrals. It must be greater than or equal to 1, and the initial number of connections per pool must ultimately be less than or equal to the maximum number of connections per pool.
      • getMaximumConnectionsPerPool

        public int getMaximumConnectionsPerPool()
        Retrieves the maximum number of idle connections that the server should maintain in each connection pool used for following referrals. By default, a maximum of ten connections will be retained.
        Returns:
        The maximum number of idle connections that the server should maintain in each connection pool used for following referrals.
      • setMaximumConnectionsPerPool

        public void setMaximumConnectionsPerPool​(int maximumConnectionsPerPool)
        Specifies the maximum number of idle connections that the server should maintain in each connection pool used for following referrals. By default, a maximum of ten connections will be retained.
        Parameters:
        maximumConnectionsPerPool - The maximum number of idle connections that the server should maintain in each connection pool used for following referrals. It must be greater than or equal to 1, and the initial number of connections per pool must ultimately be less than or equal to the maximum number of connections per pool.
      • retryFailedOperationsDueToInvalidConnections

        public boolean retryFailedOperationsDueToInvalidConnections()
        Indicates whether the connection pools should be configured to automatically retry an operation on a newly established connection if the initial attempt fails in a manner that suggests that the connection may no longer be valid. By default, operations that fail in that manner will automatically be retried.
        Returns:
        true if connection pools should be configured to automatically retry an operation on a newly established connection if the initial attempt fails in a manner that suggests the connection may no longer be valid, or false if not.
      • setRetryFailedOperationsDueToInvalidConnections

        public void setRetryFailedOperationsDueToInvalidConnections​(boolean retryFailedOperationsDueToInvalidConnections)
        Specifies whether the connection pools should be configured to automatically retry an operation on a newly established connection if the initial attempt fails in a manner that suggests that the connection may no longer be valid. By default, operations that fail in that manner will automatically be retried.
        Parameters:
        retryFailedOperationsDueToInvalidConnections - Indicates whether the connection pools should be configured to automatically retry an operation on a newly established connection if the initial attempt fails in a manner that suggests that the connection may no longer be valid.
      • getMaximumConnectionAgeMillis

        public long getMaximumConnectionAgeMillis()
        Retrieves the maximum length of time in milliseconds that each pooled connection may remain established. If a pooled connection is established for longer than this duration, it will be closed and re-established. By default, pooled connections will be allowed to remain established for up to 30 minutes. A value of zero indicates that pooled connections will be allowed to remain established indefinitely (or at least until it is determined to be invalid or the pool is closed).
        Returns:
        The maximum length of time in milliseconds that each pooled connection may remain established.
      • setMaximumConnectionAgeMillis

        public void setMaximumConnectionAgeMillis​(long maximumConnectionAgeMillis)
        Specifies the maximum length of time in milliseconds that each pooled connection may remain established. If a pooled connection is established for longer than this duration, it will be closed and re-established. By default, pooled connections will be allowed to remain established for up to 30 minutes. A value that is less than or equal to zero indicates that pooled connections will be allowed to remain established indefinitely (or at least until it is determined to be invalid or the pool is closed).
        Parameters:
        maximumConnectionAgeMillis - The maximum length of time in milliseconds that each pooled connection may remain established. A value that is less than or equal to zero indicates that pooled connections will be allowed to remain established indefinitely.
      • getMaximumPoolAgeMillis

        public long getMaximumPoolAgeMillis()
        Retrieves the maximum length of time in milliseconds that a connection pool created for the purpose of following referrals should be retained, regardless of how often it is used. If it has been longer than this length of time since a referral connection pool was created, it will be automatically closed, and a new pool will be created if another applicable referral is received. A value of zero, which is the default, indicates that connection pools should not be automatically closed based on the length of time since they were created.
        Returns:
        The maximum length of time in milliseconds that a referral connection pool should be retained, or zero if connection pools should not be automatically closed based on the length of time since they were created.
      • setMaximumPoolAgeMillis

        public void setMaximumPoolAgeMillis​(long maximumPoolAgeMillis)
        Specifies the maximum length of time in milliseconds that a connection pool created for the purpose of following referrals should be retained, regardless of how often it is used. If it has been longer than this length of time since a referral connection pool was created, it will be automatically closed, and a new pool will be created if another applicable referral is received. A value that is less than or equal to zero (with the default value being zero) indicates that connection pools should not be automatically closed based on the length of time since they were created.
        Parameters:
        maximumPoolAgeMillis - The maximum length of time in milliseconds that a referral connection pool should be retained. A value that is less than or equal to zero indicates that connection pools should not be automatically closed based on their age.
      • getMaximumPoolIdleDurationMillis

        public long getMaximumPoolIdleDurationMillis()
        Retrieves the maximum length of time in milliseconds that a connection pool created for the purpose of following referrals should be retained after its most recent use. By default, referral connection pools will be automatically discarded if they have remained unused for over one hour. A value of zero indicates that pools may remain in use indefinitely, regardless of how long it has been since they were last used.
        Returns:
        The maximum length of time in milliseconds that a connection pool created for the purpose of following referrals should be retained after its most recent use, or zero if referral connection pools should not be discarded regardless of how long it has been since they were last used.
      • setMaximumPoolIdleDurationMillis

        public void setMaximumPoolIdleDurationMillis​(long maximumPoolIdleDurationMillis)
        Specifies the maximum length of time in milliseconds that a connection pool created for the purpose of following referrals should be retained after its most recent use. By default, referral connection pools will be automatically discarded if they have remained unused for over one hour. A value of zero indicates that pools may remain in use indefinitely, regardless of how long it has been since they were last used.
        Parameters:
        maximumPoolIdleDurationMillis - The maximum length of time in milliseconds that a connection pool created for the purpose of following referrals should be retained after its most recent use. A value that is less than or equal to zero indicates that connection pools should not be automatically closed based on how long it has been since they were last used.
      • getHealthCheck

        @Nullable
        public LDAPConnectionPoolHealthCheck getHealthCheck()
        Retrieves the health check that should be used to determine whether pooled connections are still valid. By default, no special health checking will be performed for pooled connections (aside from checking them against the maximum connection age).
        Returns:
        The health check that should be used to determine whether pooled connections are still valid, or null if no special health checking should be performed.
      • setHealthCheck

        public void setHealthCheck​(@Nullable
                                   LDAPConnectionPoolHealthCheck healthCheck)
        Specifies the health check that should be used to determine whether pooled connections are still valid. By default, no special health checking will be performed for pooled connections (aside from checking them against the maximum connection age).
        Parameters:
        healthCheck - The health check that should be used to determine whether pooled connections are still valid. It may be null if no special health checking should be performed.
      • getHealthCheckIntervalMillis

        public long getHealthCheckIntervalMillis()
        Retrieves the length of time in milliseconds between background health checks performed against pooled connections. By default, background health checks will be performed every sixty seconds.
        Returns:
        The length of time in milliseconds between background health checks performed against pooled connections.
      • setHealthCheckIntervalMillis

        public void setHealthCheckIntervalMillis​(long healthCheckIntervalMillis)
        Specifies the length of time in milliseconds between background health checks performed against pooled connections.
        Parameters:
        healthCheckIntervalMillis - The length of time in milliseconds between background health checks performed against pooled connections. It must be greater than zero.
      • getBindRequest

        @Nullable
        public BindRequest getBindRequest()
        Retrieves the bind request that should be used to authenticate pooled connections, if defined. By default, pooled connections will be authenticated with the same bind request that was used to authenticate the connection on which the referral was received (with separate pools used for referrals received on connections authenticated as different users).
        Returns:
        The bind request that should be used to authenticate pooled connections, or null if pooled connections should be authenticated with the same bind request that was used to authenticate the connection on which the referral was received.
      • setBindRequest

        public void setBindRequest​(@Nullable
                                   BindRequest bindRequest)
        Specifies the bind request that should be used to authenticate pooled connections. By default, pooled connections will be authenticated with the same bind request that was used to authenticate the connection on which the referral was received (with separate pools used for referrals received on connections authenticated as different users)., but this method may be used to override that and explicitly specify a bind request to use for authenticating all pooled connections.
        Parameters:
        bindRequest - The bind request that should be used to authenticate pooled connections. It may be null if connections should be authenticated with the same bind request used to authenticate a connection on which a referral was received (with separate pools used for referrals received on connections authenticated as different users).
      • getConnectionOptions

        @Nullable
        public LDAPConnectionOptions getConnectionOptions()
        Retrieves the set of options that will be used when establishing new pooled connections for the purpose of following referrals. By default, new connections will use the same set of options as the connection on which a referral was received.
        Returns:
        The set of options that will be used when establishing new pooled connections for the purpose of following referrals, or null if new connections will use the same set of options as the connection on which a referral was received.
      • setConnectionOptions

        public void setConnectionOptions​(@Nullable
                                         LDAPConnectionOptions connectionOptions)
        Specifies the set of options that will be used when establishing new pooled connections for the purpose of following referrals. By default, new connections will use the same set of options as the connection on which a referral was received.
        Parameters:
        connectionOptions - The set of options that will be used when establishing new pooled connections for the purpose of following referrals. It may be null if new connections should use the same set of options as the connection on which a referral was received.
      • getLDAPURLSecurityType

        @NotNull
        public PooledReferralConnectorLDAPURLSecurityType getLDAPURLSecurityType()
        Indicates the type of communication security that the referral connector should use when creating connections for referral URLs with a scheme of "ldap". Although the connector will always use LDAPS for connections created from referral URLs with a scheme of "ldaps", the determination of which security type to use for referral URLs with a scheme of "ldap" is more complicated because the official LDAP URL specification lists "ldap" as the only allowed scheme type. See the class-level and value-level documentation in the PooledReferralConnectorLDAPURLSecurityType enum for more information. By default, the CONDITIONALLY_USE_LDAP_AND_CONDITIONALLY_USE_START_TLS security type will be used.
        Returns:
        The type of communication security that the referral connector should use when creating connections for referral URLs with a scheme of "ldap".
      • setLDAPURLSecurityType

        public void setLDAPURLSecurityType​(@NotNull
                                           PooledReferralConnectorLDAPURLSecurityType ldapURLSecurityType)
        Specifies the type of communication security that the referral connector should use when creating connections for referral URLs with a scheme of "ldap". Although the connector will always use LDAPS for connections created from referral URLs with a scheme of "ldaps", the determination of which security type to use for referral URLs with a scheme of "ldap" is more complicated because the official LDAP URL specification lists "ldap" as the only allowed scheme type. See the class-level and value-level documentation in the PooledReferralConnectorLDAPURLSecurityType enum for more information. By default, the CONDITIONALLY_USE_LDAP_AND_CONDITIONALLY_USE_START_TLS security type will be used.
        Parameters:
        ldapURLSecurityType - The type of communication security that the referral connector should use when creating connections for referral URLs with a scheme of "ldap". It must not be null.
      • getSSLSocketFactory

        @Nullable
        public javax.net.ssl.SSLSocketFactory getSSLSocketFactory()
        Retrieves the SSL socket factory that will be used when performing TLS negotiation on any new connections created for the purpose of following referrals. By default, new pooled connections will use the same socket factory as the connection on which a referral was received.
        Returns:
        The SSL socket factory that will be used when performing TLS negotiation on any new connections created for the purpose of following referrals, or null if new pooled connections will use the same socket factory as the connection on which a referral was received.
      • setSSLSocketFactory

        public void setSSLSocketFactory​(@Nullable
                                        javax.net.ssl.SSLSocketFactory sslSocketFactory)
        Specifies the SSL socket factory that will be used when performing TLS negotiation on any new connections created for the purpose of following referrals. By default, new pooled connections will use the same socket factory as the connection on which a referral was received.
        Parameters:
        sslSocketFactory - The SSL socket factory that will be used when performing TLS negotiation on any new connections created for the purpose of following referrals. It may be null if new pooled connections should use the same socket factory as the connection on which a referral was received.
      • toString

        @NotNull
        public java.lang.String toString()
        Retrieves a string representation of the pooled referral connector properties.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the pooled referral connector properties.
      • toString

        public void toString​(@NotNull
                             java.lang.StringBuilder buffer)
        Appends a string representation of the pooled referral connector properties to the provided buffer.
        Parameters:
        buffer - The buffer to which the string representation should be appended. It must not be null.