KafkaClient

KafkaClient is the abstraction of Kafka clients.

Note
NetworkClient is the one and only known implementation of the KafkaClient Contract in Apache Kafka.
Table 1. KafkaClient Contract
Method Description

authenticationException

AuthenticationException authenticationException(Node node)

Used when…​FIXME

close

void close(String nodeId)

Used when…​FIXME

connectionDelay

long connectionDelay(Node node, long now)

Used when…​FIXME

connectionFailed

boolean connectionFailed(Node node)

Used when…​FIXME

disconnect

void disconnect(String nodeId)

Used when…​FIXME

hasInFlightRequests

boolean hasInFlightRequests()
boolean hasInFlightRequests(String nodeId);

Used when…​FIXME

hasReadyNodes

boolean hasReadyNodes(long now)

Used when…​FIXME

inFlightRequestCount

int inFlightRequestCount()
int inFlightRequestCount(String nodeId)

Used when…​FIXME

isReady

boolean isReady(Node node, long now)

Used when…​FIXME

leastLoadedNode

Node leastLoadedNode(long now)

Used when…​FIXME

newClientRequest

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)

Used when…​FIXME

poll

List<ClientResponse> poll(long timeout, long now)

Used when:

  • InterBrokerSendThread is requested to doWork

  • NetworkClientUtils is requested to isReady, awaitReady and sendAndReceive

  • AdminClientRunnable is requested to run

  • ConsumerNetworkClient is requested to poll

  • Sender is requested to start (as a thread of execution)

pollDelayMs

long pollDelayMs(Node node, long now)

Used when…​FIXME

ready

boolean ready(Node node, long now)

Used when…​FIXME

send

void send(ClientRequest request, long now)

Queues up the ClientRequest for sending

Used when:

wakeup

void wakeup()

Used when…​FIXME

results matching ""

    No results matching ""