ControllerBrokerRequestBatch

ControllerBrokerRequestBatch is a concrete AbstractControllerBrokerRequestBatch.

ControllerBrokerRequestBatch is created exclusively for KafkaController (for brokerRequestBatch, ReplicaStateMachine, and PartitionStateMachine).

Every time ControllerBrokerRequestBatch is used it is first requested to prepare a new batch (of controller requests) that is then send out to selected brokers.

Creating ControllerBrokerRequestBatch Instance

ControllerBrokerRequestBatch takes the following to be created:

Emitting (Enqueuing) ControllerEvent — sendEvent Method

sendEvent(event: ControllerEvent): Unit
Note
sendEvent is part of the AbstractControllerBrokerRequestBatch Contract to send a ControllerEvent.

sendEvent simply requests the ControllerEventManager to enqueue the controller event.

Sending AbstractControlRequest Out to Broker — sendRequest Method

sendRequest(
  brokerId: Int,
  request: AbstractControlRequest.Builder[_ <: AbstractControlRequest],
  callback: AbstractResponse => Unit = null): Unit
Note
sendRequest is part of the AbstractControllerBrokerRequestBatch Contract to send a AbstractControlRequest to a broker.

sendRequest simply requests the ControllerChannelManager to send the request to the broker.

results matching ""

    No results matching ""