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 HttpLoadBalancerNoHealthyServersExceptionpublic void reportRequestSuccess(URI server)
reportRequestSuccess in interface HttpLoadBalancerpublic void reportRequestException(URI server)
reportRequestException in interface HttpLoadBalancerpublic void close()
close in interface HttpLoadBalancerclose in interface AutoCloseable