Skip to content

RaftClient.Listener

RaftClient.Listener<T> is an abstraction of listeners that can handleCommit and handleLoadSnapshot (among other metadata-related things).

Contract (Subset)

handleCommit

void handleCommit(
  BatchReader<T> reader)

Used when:

  • SnapshotFileReader is requested to handleMetadataBatch
  • KafkaRaftClient.ListenerContext is requested to fireHandleCommit

handleLoadSnapshot

void handleLoadSnapshot(
  SnapshotReader<T> reader)

Used when:

Implementations

  • MetadataLoader
  • OffsetTrackingListener
  • QuorumMetaLogListener
  • ReplicatedCounter