Package com.unboundid.ldap.sdk
Class PooledReferralConnectorProperties
java.lang.Object
com.unboundid.ldap.sdk.PooledReferralConnectorProperties
@Mutable
@ThreadSafety(level=NOT_THREADSAFE)
public final class PooledReferralConnectorProperties
extends Object
This class defines a set of properties for use when creating a
PooledReferralConnector. Changing any properties after a
connector is created will not cause any changes in the connector.-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new set of pooled referral connector properties with the default settings.Creates a new set of pooled referral connector properties that is a duplicate of the provided set of properties. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the bind request that should be used to authenticate pooled connections, if defined.Retrieves the set of options that will be used when establishing new pooled connections for the purpose of following referrals.Retrieves the health check that should be used to determine whether pooled connections are still valid.longRetrieves the length of time in milliseconds between background health checks performed against pooled connections.intRetrieves the initial number of connections to establish when creating a new connection pool for the purpose of following referrals.Indicates the type of communication security that the referral connector should use when creating connections for referral URLs with a scheme of "ldap".longRetrieves the maximum length of time in milliseconds that each pooled connection may remain established.intRetrieves the maximum number of idle connections that the server should maintain in each connection pool used for following referrals.longRetrieves 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.longRetrieves 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.Retrieves the SSL socket factory that will be used when performing TLS negotiation on any new connections created for the purpose of following referrals.booleanIndicates 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.voidsetBindRequest(BindRequest bindRequest) Specifies the bind request that should be used to authenticate pooled connections.voidsetConnectionOptions(LDAPConnectionOptions connectionOptions) Specifies the set of options that will be used when establishing new pooled connections for the purpose of following referrals.voidsetHealthCheck(LDAPConnectionPoolHealthCheck healthCheck) Specifies the health check that should be used to determine whether pooled connections are still valid.voidsetHealthCheckIntervalMillis(long healthCheckIntervalMillis) Specifies the length of time in milliseconds between background health checks performed against pooled connections.voidsetInitialConnectionsPerPool(int initialConnectionsPerPool) Specifies the initial number of connections to establish when creating a new connection pool for the purpose of following referrals.voidsetLDAPURLSecurityType(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".voidsetMaximumConnectionAgeMillis(long maximumConnectionAgeMillis) Specifies the maximum length of time in milliseconds that each pooled connection may remain established.voidsetMaximumConnectionsPerPool(int maximumConnectionsPerPool) Specifies the maximum number of idle connections that the server should maintain in each connection pool used for following referrals.voidsetMaximumPoolAgeMillis(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.voidsetMaximumPoolIdleDurationMillis(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.voidsetRetryFailedOperationsDueToInvalidConnections(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.voidsetSSLSocketFactory(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.toString()Retrieves a string representation of the pooled referral connector properties.voidtoString(StringBuilder buffer) Appends a string representation of the pooled referral connector properties to the provided buffer.
-
Constructor Details
-
PooledReferralConnectorProperties
public PooledReferralConnectorProperties()Creates a new set of pooled referral connector properties with the default settings. -
PooledReferralConnectorProperties
Creates a new set of pooled referral connector properties that is a duplicate of the provided set of properties.- Parameters:
properties- The set of properties to duplicate. It must not benull.
-
-
Method Details
-
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
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
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
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
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:
trueif 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, orfalseif 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
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
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
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
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
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
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
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
nullif no special health checking should be performed.
-
setHealthCheck
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 benullif no special health checking should be performed.
-
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
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
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
nullif pooled connections should be authenticated with the same bind request that was used to authenticate the connection on which the referral was received.
-
setBindRequest
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 benullif 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
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
nullif new connections will use the same set of options as the connection on which a referral was received.
-
setConnectionOptions
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 benullif new connections should use the same set of options as the connection on which a referral was received.
-
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 thePooledReferralConnectorLDAPURLSecurityTypeenum for more information. By default, theCONDITIONALLY_USE_LDAP_AND_CONDITIONALLY_USE_START_TLSsecurity 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 thePooledReferralConnectorLDAPURLSecurityTypeenum for more information. By default, theCONDITIONALLY_USE_LDAP_AND_CONDITIONALLY_USE_START_TLSsecurity 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 benull.
-
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
nullif new pooled connections will use the same socket factory as the connection on which a referral was received.
-
setSSLSocketFactory
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 benullif new pooled connections should use the same socket factory as the connection on which a referral was received.
-
toString
Retrieves a string representation of the pooled referral connector properties. -
toString
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 benull.
-