KafkaClient
is the abstraction of Kafka clients.
Note
|
NetworkClient is the one and only known implementation of the KafkaClient Contract in Apache Kafka. |
Method | Description |
---|---|
|
AuthenticationException authenticationException(Node node) Used when…FIXME |
|
void close(String nodeId) Closing the Kafka client (releasing resources) Used when:
|
|
long connectionDelay(Node node, long now) Used when…FIXME |
|
boolean connectionFailed(Node node) Used when…FIXME |
|
void disconnect(String nodeId) Used when:
|
|
boolean hasInFlightRequests()
boolean hasInFlightRequests(String nodeId); Used when…FIXME |
|
boolean hasReadyNodes(long now) Used when…FIXME |
|
int inFlightRequestCount()
int inFlightRequestCount(String nodeId) Used when…FIXME |
|
boolean isReady(Node node, long now) Used when:
|
|
Node leastLoadedNode(long now) Used when:
|
|
ClientRequest newClientRequest(
String nodeId,
AbstractRequest.Builder<?> requestBuilder,
long createdTimeMs,
boolean expectResponse)
ClientRequest newClientRequest(
String nodeId,
AbstractRequest.Builder<?> requestBuilder,
long createdTimeMs,
boolean expectResponse,
int requestTimeoutMs,
RequestCompletionHandler callback) Creates a new ClientRequest for a given AbstractRequest.Builder and RequestCompletionHandler Used when…FIXME |
|
List<ClientResponse> poll(
long timeout,
long now) Used when:
|
|
long pollDelayMs(Node node, long now) Used when…FIXME |
|
boolean ready(Node node, long now) Initiates a connection to the given broker Used when:
|
|
void send(ClientRequest request, long now) Queues up the ClientRequest for sending Used when:
|
|
void wakeup() Used when…FIXME |