DefaultQueryModelSchemaProvider

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

The Catalog's compilation of one aggregate model (design §5.2): merges the declarations of sources into the logical model under sensitivity, 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 (and the descriptors it has cached) is kept. The 9.1 declaration-file scan runs once, on the first load. 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, sensitivity: QuerySensitivityPolicy = QuerySensitivityPolicy.DEFAULT, provisionalTtl: Duration = DEFAULT_PROVISIONAL_TTL, nanoTime: LongSupplier = LongSupplier(System::nanoTime), legacyDeclarationPolicy: LegacyQuerySchemaDeclarationPolicy = LegacyQuerySchemaDeclarationPolicy.WARN, profile: QueryModelProfile? = QueryModelProfile.of(context.model))

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun refresh(): Mono<QueryModelSchema>
Link copied to clipboard
open override fun schema(): Mono<QueryModelSchema>