public class ClientSideSlb extends Object implements HttpLoadBalancer
Modifier and Type | Class and Description |
---|---|
class |
ClientSideSlb.ServerPing |
Constructor and Description |
---|
ClientSideSlb(com.facebook.buck.slb.ClientSideSlbConfig config,
okhttp3.OkHttpClient.Builder clientBuilder) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
URI |
getBestServer() |
static boolean |
isSafeToCreate(com.facebook.buck.slb.ClientSideSlbConfig config) |
void |
reportRequestException(URI server) |
void |
reportRequestSuccess(URI server) |
public ClientSideSlb(com.facebook.buck.slb.ClientSideSlbConfig config, okhttp3.OkHttpClient.Builder clientBuilder)
public static boolean isSafeToCreate(com.facebook.buck.slb.ClientSideSlbConfig config)
public URI getBestServer() throws NoHealthyServersException
getBestServer
in interface HttpLoadBalancer
NoHealthyServersException
public void reportRequestSuccess(URI server)
reportRequestSuccess
in interface HttpLoadBalancer
public void reportRequestException(URI server)
reportRequestException
in interface HttpLoadBalancer
public void close()
close
in interface HttpLoadBalancer
close
in interface AutoCloseable