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. The first load is shared by concurrent callers; a refresh reloads the sources and the storage's native structures and replaces the published schema only when it compiles to a different schema: when the version and the native facts are unchanged, the published instance is kept. 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 refresh(): QueryModelSchema
Link copied to clipboard
open suspend override fun schema(): QueryModelSchema