MetadataUpdater Contract

MetadataUpdater is an abstraction of metadata updaters that are used by NetworkClient to handle completed metadata responses.

Table 1. MetadataUpdater Contract
Method Description

close

void close()

Closes the metadata updater

fetchNodes

List<Node> fetchNodes()

Used when:

handleCompletedMetadataResponse

void handleCompletedMetadataResponse(
  RequestHeader requestHeader,
  long now,
  MetadataResponse metadataResponse)

Handles a response to a metadata request

Used when NetworkClient is requested to handle a completed MetadataResponse

handleDisconnection

void handleDisconnection(
  String destination)

Used when NetworkClient is requested to disconnect, close, and processDisconnection

handleFatalException

void handleFatalException(
  KafkaException fatalException)

Used when NetworkClient is requested to doSend and processDisconnection

isUpdateDue

boolean isUpdateDue(
  long now)

Used when NetworkClient is requested to isReady

maybeUpdate

long maybeUpdate(
  long now)

Starts a cluster metadata update if needed and possible.

Used when NetworkClient is requested to read and write to sockets.

requestUpdate

void requestUpdate()

Schedules an update of the current cluster metadata

Table 2. MetadataUpdaters
MetadataUpdater Description

AdminMetadataUpdater

DefaultMetadataUpdater

Default MetadataUpdater of NetworkClient

ManualMetadataUpdater

results matching ""

    No results matching ""