DefaultQueryModelSchemaProvider

class DefaultQueryModelSchemaProvider(context: QuerySchemaContext, sources: List<QuerySchemaSource>, adapter: QueryStorageAdapter, provisionalTtl: Duration = DEFAULT_PROVISIONAL_TTL, nanoTime: LongSupplier = LongSupplier(System::nanoTime), profile: QueryModelProfile? = QueryModelProfile.of(context.model), sensitivity: QuerySensitivityPolicy = QuerySensitivityPolicy.DEFAULT) : QueryModelSchemaProvider

The Catalog's compilation of one aggregate model: merges the declarations of sources into the logical model, asks the storage adapter for its facts about it, and compiles them into the published QueryModelSchema. A load is shared by the callers that arrive while it runs. The first schema that compiles is published and kept: the storage is not asked again, so a change to its native structures is seen by the next node's start. A load that fails publishes nothing, and the next caller loads again. A provisional schema is never published: it is answered for provisionalTtl, so a storage that is never written is not asked again on every query, and the first load after that compiles the storage again. Once the storage exists its schema is the one published, at most provisionalTtl after it does.

Constructors

Link copied to clipboard
constructor(context: QuerySchemaContext, sources: List<QuerySchemaSource>, adapter: QueryStorageAdapter, provisionalTtl: Duration = DEFAULT_PROVISIONAL_TTL, nanoTime: LongSupplier = LongSupplier(System::nanoTime), profile: QueryModelProfile? = QueryModelProfile.of(context.model), sensitivity: QuerySensitivityPolicy = QuerySensitivityPolicy.DEFAULT)

Types

Link copied to clipboard

Functions

Link copied to clipboard
open suspend override fun schema(): QueryModelSchema