Package-level declarations

Types

Link copied to clipboard

The access schema of an aggregate type: what its streams' attributes are derived as, the declared ones by name, each with the kind of its stored values and whether it holds many (department:string,teams:string[]), empty for none. The built-in owner and space are of every schema.

Link copied to clipboard

Rewrites the snapshot of an aggregate from its whole log (EventStreamRecords from version 1), already replayed as its state: the access walk's share of the snapshots, which carry the attributes of the state they hold.

Link copied to clipboard
class AccessStamping(context: String, models: Collection<AggregateModel<*>>, kernel: Kernel, stampsOf: (AggregateType) -> AccessStamps?, options: AccessStampOptions = AccessStampOptions(), val walking: AccessWalking? = null, observer: Observer = Observer.NONE, time: TimeSource = TimeSource.Monotonic)

The built-in subscription NAME of one bounded context: it keeps the access attributes of each aggregate's history its current ones. The kernel stamps each commit with the attributes after it (AccessValues.ofStream); when a commit changed them (its attributes differ from those of the stream before it), this subscription stamps them over every earlier stream of the aggregate (AccessStamps.stamp), as of the commit's version, in stamps of at most AccessStampOptions.batch streams. So an events query authorizes an aggregate's whole history by what it is now, within the subscription's lag.

Link copied to clipboard
class AccessStampOptions @InternalWowApi constructor(val batch: Int = DEFAULT_BATCH, val capacity: Int = DEFAULT_CAPACITY, val walkBatch: Int = DEFAULT_WALK_BATCH, val walkRate: Int = DEFAULT_WALK_RATE, val walkShare: Double = DEFAULT_WALK_SHARE, val interval: Duration = DEFAULT_INTERVAL, val leaseTtl: Duration = DEFAULT_TTL, val memberTtl: Duration = DEFAULT_TTL)

How a context stamps the histories (AccessStamping, AccessWalking): at most batch streams in one stamp, so one long history is written in statements of a bounded size, each by the version key; the last stamped attributes of at most capacity aggregates, which spare the follower a read of the previous stream; and the walks, walkBatch aggregates a page at most, at most walkRate a second and at most walkShare of the time, run every interval under a lease of leaseTtl, each node a member of its access schema of each type for memberTtl after its last run. The host configures them (wow.access.*).

Link copied to clipboard
class AccessWalking(val context: String, group: String, node: String, models: Collection<AggregateModel<*>>, kernel: Kernel, logOf: (AggregateType) -> EventLog?, leases: LeaseStore, options: AccessStampOptions = AccessStampOptions(), snapshots: AccessSnapshots = AccessSnapshots.NONE, address: () -> String = { node }, observer: Observer = Observer.NONE, gate: ReplayGate = ReplayGate.OPEN, time: TimeSource = TimeSource.Monotonic)

The access walks of one bounded context, on every node, every AccessStampOptions.interval: each aggregate type's history stamped with the attributes of its aggregates' current states, where no commit stamped it with the type's current access schema (AccessSchema): a log an earlier version wrote, an import, an attribute the model declares since.

Link copied to clipboard
class Stamped(val version: Int, val access: Map<String, Any?>)

The attributes of an aggregate's history as of version: what a stamp wrote, or a stream carries.

Functions

Link copied to clipboard

Writes stamps together (AccessStamps.stampAll), in writes of at most batch streams each: a stamp of more is cut into chunks of batch, each written whole in one write. Returns the streams stamped.