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:
MetadataLoader.Builder
is requested to build a MetadataLoader
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:
MetadataShell
is requested to run (to register a MetadataShellPublisher)BrokerServer
is requested to startupControllerServer
is requested to startupSharedServer
is requested to start (to register a SnapshotGenerator)
scheduleInitializeNewPublishers¶
void scheduleInitializeNewPublishers(
long delayNs)
scheduleInitializeNewPublishers
...FIXME
scheduleInitializeNewPublishers
is used when:
MetadataLoader
is requested to initializeNewPublishers, maybePublishMetadata and installPublishers
initializeNewPublishers¶
void initializeNewPublishers()
initializeNewPublishers
...FIXME
maybePublishMetadata¶
void maybePublishMetadata(
MetadataDelta delta,
MetadataImage image,
LoaderManifest manifest)
maybePublishMetadata
...FIXME
maybePublishMetadata
is used when:
MetadataLoader
is created and requested to handleLoadSnapshot
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