Package-level declarations

Types

Link copied to clipboard
class EventQueryBackend(store: (AggregateType) -> String? = { null }, prepare: (AggregateType) -> Unit = {}, indexes: (AggregateType, QueryIndexPlan) -> QueryIndexReport? = null, manages: (AggregateType) -> Boolean = { true }, val bindings: QueryBindings<AggregateType>)

The events query backend of the node: the bindings of each aggregate type's events backend and storage facts, none for a type no backend serves (its events are then not queried), and the store its queries run on, null for the application's own backend. For a store whose events queries manage indexes (me.ahoo.wow.query.store.EventStoreQueries), how it prepares a type's log and manages the indexes of its access attributes at startup. It is not itself QueryBindings, so that it is never taken for the application's snapshot bindings bean.

Link copied to clipboard

The node's dataset bindings: the application's, or a dataset backend's (provided); null when no backend serves datasets. Closed with the context, they close a dataset backend's bindings that hold resources of their own (a client it opened), never the application's.

Link copied to clipboard
class HostQueryNode(nodes: ObjectProvider<ServiceNode>) : SmartInitializingSingleton

The node whose write pressure the stores' query bounds adapt to (HostQueryBulkheads.pressureOf), taken once the context has built every singleton. The bounds cannot take the node as a parameter: the node is built with the gate its state rebuilds replay under (me.ahoo.wow.runtime.state.ReplayGate), which is built over them.

Link copied to clipboard
@AutoConfiguration(after = [WowAutoConfiguration::class])
@ConditionalOnClass(name = ["me.ahoo.wow.query.QueryModule"])
@ConditionalOnProperty(prefix = "wow.query", name = ["enabled"], matchIfMissing = true)
@EnableConfigurationProperties(value = [QueryProperties::class])
class QueryAutoConfiguration

The query plane, active when wow-query is on the classpath (wow-http brings it) and wow.query.enabled is not off. Over the node's Manifest it builds:

Link copied to clipboard

The application's beans a QueryEngine is built of: each it may give, or not.

Link copied to clipboard
class QueryIndexesLifecycle(manifest: Manifest, types: List<AggregateType>, backend: SnapshotQueryBackend, catalog: QuerySchemaCatalog, events: EventQueryBackend = EventQueryBackend.NONE, eventTypes: List<AggregateType> = emptyList(), ddlKeyOf: (store: String?) -> String = { DDL }) : SmartLifecycle

Manages the indexes of every aggregate type in types at startup, after the backends' schemas exist (BackendsLifecycle) and before the node starts: each aggregate's storage is prepared, its query model compiled from catalog, and its Manifest's x-wow-index planned and managed by backend as the ddl of the store it is on says (wow.stores.<store>.ddl, else wow.ddl). A key the model cannot index fails the start, and so does an index that validate finds missing or invalid: a query it would serve scans the whole collection.

Link copied to clipboard
@ConfigurationProperties(prefix = "wow.query")
class QueryProperties

The query plane's configuration, wow.query.*, read by QueryAutoConfiguration: the query routes and gateways, the budgets they run under, who may query what, and how many queries each store runs at once.

Link copied to clipboard
@ConfigurationProperties(prefix = "wow.query.state")
class QueryStateProperties

The reads of an aggregate's state at a version or a point in time. The node serves them with the query plane off too, wow.query.enabled: false or no query module, and these keys apply to them either way.

Link copied to clipboard
class SnapshotQueryBackend(val bindings: QueryBindings<AggregateType>?, prepare: (AggregateType) -> Unit = {}, indexes: (AggregateType, QueryIndexPlan) -> QueryIndexReport? = null, serves: (AggregateType) -> Boolean = { bindings != null }, store: (AggregateType) -> String? = { null })

The snapshot query backend of the node: the bindings of each aggregate type's backend and storage facts (null when no backend serves the node's snapshots), and, for a backend the host manages, how it prepares an aggregate's storage and manages its x-wow-index indexes and those of its access attributes at startup.