Skip to content

MetadataLoader

MetadataLoader is built for a SharedServer.

Creating Instance

MetadataLoader takes the following to be created:

  • Time
  • LogContext
  • Node ID (not used)
  • Thread Name Prefix
  • FaultHandler
  • MetadataLoaderMetrics
  • HighWaterMarkAccessor

MetadataLoader is created when:

HighWaterMarkAccessor

MetadataLoader is given a high watermark accessor (a Supplier<OptionalLong>) when created (when SharedServer is requested to start).

The high watermark accessor is the highWatermark from the KafkaRaftClient of a KafkaRaftManager.

Installing MetadataPublishers

CompletableFuture<Void> installPublishers(
  List<? extends MetadataPublisher> newPublishers)

installPublishers adds all the MetadataPublishers (in the given newPublishers) to the uninitializedPublishers registry followed by scheduleInitializeNewPublishers.


installPublishers is used when:

scheduleInitializeNewPublishers

void scheduleInitializeNewPublishers(
  long delayNs)

scheduleInitializeNewPublishers...FIXME


scheduleInitializeNewPublishers is used when:

initializeNewPublishers

void initializeNewPublishers()

initializeNewPublishers...FIXME

maybePublishMetadata

void maybePublishMetadata(
  MetadataDelta delta,
  MetadataImage image,
  LoaderManifest manifest)

maybePublishMetadata...FIXME


maybePublishMetadata is used when:

handleLoadSnapshot

RaftClient.Listener
void handleLoadSnapshot(
  SnapshotReader<ApiMessageAndVersion> reader)

handleLoadSnapshot is part of the RaftClient.Listener abstraction.

handleLoadSnapshot...FIXME

loadSnapshot

SnapshotManifest loadSnapshot(
  MetadataDelta delta,
  SnapshotReader<ApiMessageAndVersion> reader)

loadSnapshot...FIXME