Package-level declarations

Types

Link copied to clipboard

Command commandId of ref waited in its aggregate's lane past its wait's deadline and was withdrawn before it entered the kernel: it never executed, so a retry with the same request id runs it.

Link copied to clipboard
class Executor(kernel: Kernel, laneCapacity: Int = DEFAULT_LANE_CAPACITY, maxBatch: Int = DEFAULT_MAX_BATCH, views: SharedStates? = null, limit: InFlightLimit = InFlightLimit(), clock: Clock = Clock.systemUTC(), fatals: NodeFatals = NodeFatals.NONE)

Runs commands through kernel, one at a time per aggregate and in arrival order, without one aggregate ever waiting for another (step 3).

Link copied to clipboard
class ExecutorBusyException(val ref: AggregateRef, val capacity: Int, val node: Boolean = false) : IllegalStateException

The command of ref was not taken: its aggregate already has capacity commands waiting, or, when node, the node already has capacity commands in flight (InFlightLimit).

Link copied to clipboard
class ExecutorOptions @InternalWowApi constructor(val laneCapacity: Int = Executor.DEFAULT_LANE_CAPACITY, val maxBatch: Int = Executor.DEFAULT_MAX_BATCH, val maxInFlight: Int = InFlightLimit.DEFAULT_MAX)

How a node's executors take commands.

Link copied to clipboard
class InFlightLimit(val max: Int = DEFAULT_MAX)

A node's bound on the commands in flight in its executors (wow.executor.max-in-flight): those taken and not finished, waiting in their lanes or in the kernel. The executors of every context on a node share one, so it bounds the node's memory and the work it queues ahead of its stores, whichever aggregates the commands are for.

Link copied to clipboard
class LruStateCache(capacity: Int = Int.MAX_VALUE, maxBytes: Long = Long.MAX_VALUE, weigh: (CachedState) -> Long = CachedState::bytes, evicted: () -> Unit = {}) : StateCache

A StateCache of at most capacity aggregates and maxBytes of their estimated size (weigh), evicting the least recently used while either is passed. Taking a state out (for a command) frees its room until the command puts it back, weighed again then. invalidate drops a partition's states when the node acquires or releases it, scanning every stripe; dropBefore drops one state behind the log, under its stripe's lock.

Link copied to clipboard
class StateCacheOptions @InternalWowApi constructor(val capacity: Int? = null, val recentRequests: Int = Kernel.DEFAULT_RECENT_REQUESTS)

What each context's state cache keeps between commands.

Link copied to clipboard

How much each context's state cache keeps when the host does not bound it by a number of states (wow.state-cache.capacity): a HEAP_SHARE of the JVM's maximum heap, split between the node's contexts, in the estimated bytes of the states it holds. A cached state is the aggregate's state object with its metadata, estimated at CachedState.STATE_BYTES, and its recent requests, whose rings grow with the requests the aggregate committed: most aggregates commit few, so the bytes hold far more of them than a count sized for full rings would. A domain whose states are much larger than the estimate sets the capacity itself.