Search in sources :

Example 6 with PropertyEvent

use of com.linkedin.d2.discovery.event.PropertyEventThread.PropertyEvent in project rest.li by linkedin.

the class SimpleLoadBalancerState method register.

public void register(final SimpleLoadBalancerStateListener listener) {
    trace(_log, "register listener: ", listener);
    _executor.execute(new PropertyEvent("add listener for state") {

        @Override
        public void innerRun() {
            _listeners.add(listener);
        }
    });
}
Also used : PropertyEvent(com.linkedin.d2.discovery.event.PropertyEventThread.PropertyEvent)

Aggregations

PropertyEvent (com.linkedin.d2.discovery.event.PropertyEventThread.PropertyEvent)6 Callback (com.linkedin.common.callback.Callback)1 SimpleCallback (com.linkedin.common.callback.SimpleCallback)1 None (com.linkedin.common.util.None)1 LoadBalancerClusterListener (com.linkedin.d2.balancer.LoadBalancerClusterListener)1 TrackerClient (com.linkedin.d2.balancer.clients.TrackerClient)1 LoadBalancerStrategy (com.linkedin.d2.balancer.strategies.LoadBalancerStrategy)1 RelativeLoadBalancerStrategy (com.linkedin.d2.balancer.strategies.relative.RelativeLoadBalancerStrategy)1 PropertyEventShutdownCallback (com.linkedin.d2.discovery.event.PropertyEventThread.PropertyEventShutdownCallback)1 TransportClient (com.linkedin.r2.transport.common.bridge.client.TransportClient)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 Map (java.util.Map)1 Set (java.util.Set)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1