Package org.forgerock.opendj.ldap
Interface LoadBalancerEventListener
-
- All Superinterfaces:
EventListener
public interface LoadBalancerEventListener extends EventListener
An object that registers to be notified when an LDAP client associated with a load-balancer changes state from offline to online or vice-versa.NOTE: load-balancer implementations must ensure that only one event is sent at a time. Event listener implementations should not need to be thread safe.
- See Also:
LdapClients.LOAD_BALANCER_EVENT_LISTENER
-
-
Field Summary
Fields Modifier and Type Field Description static LoadBalancerEventListener
LOG_EVENTS
An event listener implementation which logs events to the LoadBalancingAlgorithm logger.static LoadBalancerEventListener
NO_OP
An event listener implementation which ignores all events.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
handleLdapClientOffline(LdapClient client, LdapException error)
Invoked when the load-balancer is unable to obtain a connection from the specified LDAP client.void
handleLdapClientOnline(LdapClient client)
Invoked when the load-balancer detects that a previously offline LDAP client is available for use again.
-
-
-
Field Detail
-
LOG_EVENTS
static final LoadBalancerEventListener LOG_EVENTS
An event listener implementation which logs events to the LoadBalancingAlgorithm logger. This event listener is the default implementation configured using theLdapClients.LOAD_BALANCER_EVENT_LISTENER
option.
-
NO_OP
static final LoadBalancerEventListener NO_OP
An event listener implementation which ignores all events.
-
-
Method Detail
-
handleLdapClientOffline
void handleLdapClientOffline(LdapClient client, LdapException error)
Invoked when the load-balancer is unable to obtain a connection from the specified LDAP client. The LDAP client will be removed from the load-balancer and monitored periodically in order to determine when it is available again, at which point an online notification event will occur.- Parameters:
client
- The LDAP client which has failed.error
- The last error that occurred.
-
handleLdapClientOnline
void handleLdapClientOnline(LdapClient client)
Invoked when the load-balancer detects that a previously offline LDAP client is available for use again.- Parameters:
client
- The LDAP client which is now available for use.
-
-