Package-level declarations

Types

Link copied to clipboard

The properties of one event of EventStreamFields.EVENTS.

Link copied to clipboard

The names of an event stream record's fields: one record per stream, the commit of one command at one version, as me.ahoo.wow.spi.log.EventStreamRecord holds it. OPERATOR is {id, tenantId, actedElsewhere}, or null for an anonymous caller; ACCESS the aggregate's current access attributes, or null when not stamped; EVENTS holds each event as {name, revision, body} (EventFields).

Link copied to clipboard

The properties of an operator system field (SnapshotFields.OPERATOR, SnapshotFields.FIRST_OPERATOR).

Link copied to clipboard

The JSON codec of the query protocol (:query-api), the wire 9.x writes: the model is plain data, so this module gives it its names, discriminators and inclusions.

Link copied to clipboard

The names of a snapshot record's fields as the query side reads them: one record per aggregate, the columns of me.ahoo.wow.spi.snapshot.SnapshotRecord with the state under STATE. 9.x's contextName, aggregateName, eventId and snapshotTime are gone, and 9.x's eventTime is LAST_EVENT_TIME: a snapshot query is always of one aggregate type, which the backend adds itself. OPERATOR and FIRST_OPERATOR keep 9.x's names but are objects, {id, tenantId, actedElsewhere} (OperatorFields), or null for an anonymous caller: filter on operator.id.

Functions

Link copied to clipboard
fun <T : Any> decode(node: JsonNode, type: Class<T>): T

node as type: the node itself when it is one (an ObjectNode, a JsonNode), else decoded by WowJson.

Link copied to clipboard
fun ObjectNode.toEventStream(type: AggregateType, eventType: (String) -> Class<*>?): EventStream

This events query record (EventQueryGateways.kt) of type, each event's body decoded as the class eventType gives its name, an ObjectNode when it gives none. A body masked whole, an event the node's Manifest does not know, stays the JSON null it was answered as (a NullNode). So does a schedule's event read into its class (ScheduleSet) whose command was masked whole, a command whose schema the node does not hold: the class holds a command, so the event is answered with no body, as an event masked whole is. Read as a tree (an ObjectNode, when eventType gives no class), it keeps its body, the masked command null in it.

Link copied to clipboard
fun Snapshot<JsonNode>.toRecord(): ObjectNode

This snapshot as the record a snapshot query returns and a state read answers: the SnapshotFields in their order, an absent owner, space or operator as null, and the state tree under SnapshotFields.STATE; toSnapshot reads it back.

Link copied to clipboard

This operator as a record's operator field: {id, tenantId, actedElsewhere}, or JSON null when absent.

Link copied to clipboard
fun <S : Any> ObjectNode.toSnapshot(type: AggregateType, stateType: Class<S>): Snapshot<S>

This snapshot query record (SnapshotQueryRecords.kt) of type, its state decoded as stateType.