DatasetRegistryProjection

class DatasetRegistryProjection(datasets: QueryDatasets, source: PublishedDatasetSource, interval: Duration) : SmartLifecycle

Serves the registry's published datasets on this instance (dataset platform design §4.3): it reads them now and every interval, and adds, replaces or removes them in datasets. Reading the published versions, rather than following the registry's events, lets every instance converge on them whichever one handled a command.

A dataset of a declaration file wins: a published dataset of the same name is not served (the registry refuses to publish one, CompilingDatasetPublicationCheck). A published version this instance cannot serve (its table changed, say) is logged and left out; the other datasets are served.

Constructors

Link copied to clipboard
constructor(datasets: QueryDatasets, source: PublishedDatasetSource, interval: Duration)

Properties

Link copied to clipboard
open override val isRunning: Boolean
Link copied to clipboard

The datasets this projection serves: the registry's, not the declaration files'.

Functions

Link copied to clipboard
open override fun isRunning(): Boolean
Link copied to clipboard
fun refresh(): Mono<Void>

Serves the currently published versions once.

Link copied to clipboard
open override fun start()
Link copied to clipboard
open override fun stop()