KafkaClient¶
KafkaClient
is an interface to NetworkClient.
Contract¶
inFlightRequestCount¶
int inFlightRequestCount()
int inFlightRequestCount(
String nodeId)
Used when:
ConsumerNetworkClient
is requested to pendingRequestCount and pollSender
is requested to runSenderMetrics
is requested forrequests-in-flight
performance metric
leastLoadedNode¶
Node leastLoadedNode(
long now)
Used when:
ConsumerNetworkClient
is requested for the leastLoadedNodeDefaultMetadataUpdater
is requested tomaybeUpdate
KafkaAdminClient
is usedSender
is requested for the maybeSendAndPollTransactionalRequest
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:
AdminClientRunnable
is requested tosendEligibleCalls
ConsumerNetworkClient
is requested to sendNetworkClient
is requested to newClientRequest, sendInternalMetadataRequest and handleInitiateApiVersionRequestsRequestSendThread
is requested todoWork
Sender
is requested to runKafkaServer
is requested tocontrolledShutdown
ReplicaFetcherBlockingSend
is requested tosendRequest
poll¶
List<ClientResponse> poll(
long timeout,
long now)
Used when:
- FIXME
pollDelayMs¶
long pollDelayMs(
Node node,
long now)
Used when:
- FIXME
Is Node Ready and Connected¶
boolean ready(
Node node,
long now);
Used when:
AdminClientRunnable
is requested to sendEligibleCallsConsumerNetworkClient
is requested to tryConnect and trySendInterBrokerSendThread
is requested to sendRequestsNetworkClientUtils
is requested to awaitReadySender
is requested to sendProducerData
send¶
void send(
ClientRequest request,
long now)
Used when:
- FIXME
wakeup¶
void wakeup()
Used when:
- FIXME
Implementations¶
Closeable¶
KafkaClient
is a Closeable
(Java).