public class DruidLeaderClient extends Object
| Constructor and Description |
|---|
DruidLeaderClient(HttpClient httpClient,
DruidNodeDiscoveryProvider druidNodeDiscoveryProvider,
NodeRole nodeRoleToWatch,
String leaderRequestPath) |
| Modifier and Type | Method and Description |
|---|---|
String |
findCurrentLeader() |
StringFullResponseHolder |
go(Request request)
Executes a Request object aimed at the leader.
|
<T,H extends FullResponseHolder<T>> |
go(Request request,
HttpResponseHandler<H,H> responseHandler)
Executes a Request object aimed at the leader.
|
Request |
makeRequest(org.jboss.netty.handler.codec.http.HttpMethod httpMethod,
String urlPath)
Make a Request object aimed at the leader.
|
void |
start() |
void |
stop() |
public DruidLeaderClient(HttpClient httpClient, DruidNodeDiscoveryProvider druidNodeDiscoveryProvider, NodeRole nodeRoleToWatch, String leaderRequestPath)
public void start()
public void stop()
public Request makeRequest(org.jboss.netty.handler.codec.http.HttpMethod httpMethod, String urlPath) throws IOException
IOExceptionpublic StringFullResponseHolder go(Request request) throws IOException, InterruptedException
request - IOExceptionInterruptedExceptionpublic <T,H extends FullResponseHolder<T>> H go(Request request, HttpResponseHandler<H,H> responseHandler) throws IOException, InterruptedException
request - responseHandler - IOExceptionInterruptedExceptionpublic String findCurrentLeader()
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.