Package | Description |
---|---|
org.forgerock.opendj.ldap |
Classes and interfaces for core types including connections, entries, and
attributes.
|
Modifier and Type | Interface and Description |
---|---|
interface |
ConnectionPool
An LDAP client which maintains and re-uses a pool of connections.
|
Modifier and Type | Method and Description |
---|---|
static LdapClient |
LdapClients.newAffinityRequestLoadBalancer(Collection<? extends LdapClient> clients,
Options options)
Creates a new "affinity" load-balancer which will load-balance individual requests across the provided set of
LDAP clients, each typically representing a single replica, using an algorithm that ensures that requests
targeting a given DN will always be routed to the same replica.
|
static LdapClient |
LdapClients.newFailoverLoadBalancer(Collection<? extends LdapClient> clients,
Options options)
Creates a new "fail-over" load-balancer which will load-balance connections across the provided set of LDAP
clients.
|
static LdapClient |
LdapClients.newFixedSizeDistributionLoadBalancer(Set<Dn> partitionBaseDns,
ConsistentHashMap<? extends LdapClient> partitions,
Options options)
Creates a distribution load balancer which uses consistent hashing to distributes requests across a set of
partitions based on a hash of each request's target DN.
|
static LdapClient |
LdapClients.newInternalLdapClient(io.reactivex.functions.BiFunction<Integer,Request,io.reactivex.Flowable<Response>> requestHandler)
Creates a new
LdapClient which will route requests to the provided requestHandler . |
static LdapClient |
LdapClients.newLdapClient(String host,
int port)
Creates a new LDAP client which can be used to create LDAP connections to the Directory Server at
the provided host and port number, and using default options.
|
static LdapClient |
LdapClients.newLdapClient(String host,
int port,
Options options)
Creates a new LDAP client which can be used to create LDAP connections to the Directory Server at
the provided host and port number and custom options.
|
static LdapClient |
LdapClients.newLeastRequestsLoadBalancer(Collection<? extends LdapClient> clients,
Options options)
Creates a new "least requests" load-balancer which will load-balance individual requests across the provided
set of LDAP clients, each typically representing a single replica, using an algorithm that ensures that
requests are routed to the replica which has the minimum number of active requests.
|
static LdapClient |
LdapClients.newNamedLdapClient(LdapClient client,
String name)
Creates a new LDAP client which forwards connection requests to the provided client, but whose
toString method will always return name . |
static LdapClient |
LdapClients.newNullLdapClient()
Returns an LDAP client which always throws
ResultCode.CLIENT_SIDE_CONNECT_ERROR ,
without any error message. |
static LdapClient |
LdapClients.newNullLdapClient(String name,
org.forgerock.i18n.LocalizableMessage connectErrorMessage)
Returns an LDAP client which always throws
ResultCode.CLIENT_SIDE_CONNECT_ERROR
using the provided error message. |
Modifier and Type | Method and Description |
---|---|
void |
LoadBalancerEventListener.handleLdapClientOffline(LdapClient client,
LdapException error)
Invoked when the load-balancer is unable to obtain a connection from the
specified LDAP client.
|
void |
LoadBalancerEventListener.handleLdapClientOnline(LdapClient client)
Invoked when the load-balancer detects that a previously offline
LDAP client is available for use again.
|
static ConnectionPool |
LdapClients.newCachedConnectionPool(LdapClient client)
Creates a new connection pool which creates new connections as needed
using the provided LDAP client, but will reuse previously
allocated connections when they are available.
|
static ConnectionPool |
LdapClients.newCachedConnectionPool(LdapClient client,
int corePoolSize,
int maximumPoolSize,
long idleTimeout,
TimeUnit unit)
Creates a new connection pool which creates new connections as needed
using the provided LDAP client, but will reuse previously
allocated connections when they are available.
|
static ConnectionPool |
LdapClients.newCachedConnectionPool(LdapClient client,
int corePoolSize,
int maximumPoolSize,
long idleTimeout,
TimeUnit unit,
ScheduledExecutorService scheduler)
Creates a new connection pool which creates new connections as needed
using the provided LDAP client, but will reuse previously
allocated connections when they are available.
|
static ConnectionPool |
LdapClients.newFixedConnectionPool(LdapClient client,
int poolSize)
Creates a new connection pool which will maintain
poolSize
connections created using the provided LDAP client. |
static LdapClient |
LdapClients.newNamedLdapClient(LdapClient client,
String name)
Creates a new LDAP client which forwards connection requests to the provided client, but whose
toString method will always return name . |
Modifier and Type | Method and Description |
---|---|
static LdapClient |
LdapClients.newAffinityRequestLoadBalancer(Collection<? extends LdapClient> clients,
Options options)
Creates a new "affinity" load-balancer which will load-balance individual requests across the provided set of
LDAP clients, each typically representing a single replica, using an algorithm that ensures that requests
targeting a given DN will always be routed to the same replica.
|
static LdapClient |
LdapClients.newFailoverLoadBalancer(Collection<? extends LdapClient> clients,
Options options)
Creates a new "fail-over" load-balancer which will load-balance connections across the provided set of LDAP
clients.
|
static LdapClient |
LdapClients.newFixedSizeDistributionLoadBalancer(Set<Dn> partitionBaseDns,
ConsistentHashMap<? extends LdapClient> partitions,
Options options)
Creates a distribution load balancer which uses consistent hashing to distributes requests across a set of
partitions based on a hash of each request's target DN.
|
static LdapClient |
LdapClients.newLeastRequestsLoadBalancer(Collection<? extends LdapClient> clients,
Options options)
Creates a new "least requests" load-balancer which will load-balance individual requests across the provided
set of LDAP clients, each typically representing a single replica, using an algorithm that ensures that
requests are routed to the replica which has the minimum number of active requests.
|
Constructor and Description |
---|
LdapConnectionFactory(LdapClient ldapClient)
Creates a new LDAP connection factory which can be used to create LDAP connections to the Directory Server at the
provided host and port number.
|
Copyright © 2010-2018, ForgeRock All Rights Reserved.