KernelOptions

class KernelOptions @InternalWowApi constructor(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)

The tuning of a Kernel, set in code, not by configuration keys:

  • 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.

Fields may be added: construct it with named arguments; the constructor is internal to Wow.

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)

Types

Link copied to clipboard
object Companion

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

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