CachedState

class CachedState(val state: Any, val version: Int, val scope: Scope = Scope.NONE, val deleted: Boolean = false, val schedules: Map<String, ScheduleRule> = emptyMap())

An aggregate's state after its event stream version, with the metadata the kernel keeps beside it: its scope, the owner and space it has after that stream, which the next stream carries forward; whether it is deleted. Only the lifecycle commands change them. Its schedules are the rules of the schedules it keeps, by key: those its streams set and did not cancel.

Constructors

Link copied to clipboard
constructor(state: Any, version: Int, scope: Scope = Scope.NONE, deleted: Boolean = false, schedules: Map<String, ScheduleRule> = emptyMap())

Types

Link copied to clipboard

Properties

Link copied to clipboard
val bytes: Long

The estimated bytes it takes in a cache before its class's size is measured (StateSizes): STATE_BYTES for the state with its metadata, and what its recent requests' rings take.

Link copied to clipboard
Link copied to clipboard

What the aggregate's first stream recorded (its commit time and operator), when the kernel loaded or created the aggregate: the snapshot's, the replayed first stream's, or the creating stream's. A state view carries it, so the snapshot subscription writes the snapshot without reading the stored one for it.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val state: Any
Link copied to clipboard