KernelOptions

class KernelOptions(val maxAttempts: Int = DEFAULT_MAX_ATTEMPTS, val verifyDecidePurity: Boolean = false, val reservationTtl: Duration = DEFAULT_RESERVATION_TTL, val maxEarlyWait: Duration = DEFAULT_MAX_EARLY_WAIT, val recentRequests: Int = Kernel.DEFAULT_RECENT_REQUESTS, val maxReplay: Int = DEFAULT_MAX_REPLAY, val snapshotLoadTimeout: Duration = DEFAULT_SNAPSHOT_LOAD_TIMEOUT)

The tuning of a Kernel, internal to Wow: the host builds it, recentRequests, maxEarlyWait and snapshotLoadTimeout from wow.state-cache.recent-requests, wow.timers.max-early-wait and the snapshot load timeout of the host's configuration, the rest from Wow's defaults:

  • maxAttempts: the times a command is decided again after a version conflict before it is answered as contended;

  • verifyDecidePurity: whether every decide function is checked not to change the state it was given (the test DSL turns it on; it costs two serializations of the state per command);

  • reservationTtl: how long a pending reservation lives unless the append confirms it first;

  • maxEarlyWait: how long a scheduled command due later by the kernel's clock is held for its slot before it fails as not due, to be sent again;

  • recentRequests: the requests each cached aggregate keeps of those it committed last, so that most commands skip looking their request id up (0 looks every one up);

  • maxReplay: the most streams a read of a state at a version folds (Kernel.stateAt): a state further from its snapshot, or from version 1 without one, is refused with ReplayLimitExceededException, which names the aggregate, instead of replaying a long history on one read;

  • snapshotLoadTimeout: how long a cache miss waits for its snapshot (SnapshotStore.load, or the one-round-trip read of the snapshot with its tail) before it takes it as failed and replays the log: a snapshot is only a cache, so a store that stops answering costs a replay, not the command's wait.

Fields may be added.

Constructors

Link copied to clipboard
constructor(maxAttempts: Int = DEFAULT_MAX_ATTEMPTS, verifyDecidePurity: Boolean = false, reservationTtl: Duration = DEFAULT_RESERVATION_TTL, maxEarlyWait: Duration = DEFAULT_MAX_EARLY_WAIT, recentRequests: Int = Kernel.DEFAULT_RECENT_REQUESTS, maxReplay: Int = DEFAULT_MAX_REPLAY, snapshotLoadTimeout: Duration = DEFAULT_SNAPSHOT_LOAD_TIMEOUT)

Types

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String