public static synchronized ILoadBalancer getNamedLoadBalancer ( String name , Class < ? extends IClientConfig > configClass ) { ILoadBalancer lb = namedLBMap . get ( name ) ; if ( lb != null ) { return lb ; } else { try { lb = registerNamedLoadBalancerFromProperties ( name , configClass ) ; } catch ( ClientException e ) { throw new RuntimeException ( "Unable to create load balancer" , e ) ; } return lb ; } }
Get the load balancer associated with the name or create one with an instance of configClass if does not exist