Package-level declarations

Types

Link copied to clipboard
@Summary(value = "An action was refused")
data class ActionRefused(val action: String, val code: String, val reason: String)

The owning service refused the operator's last request on the entry: the ledger's system command action, with the error code and reason of its rejection.

Link copied to clipboard
@Summary(value = "Apply a retry spec to a parked entry")
data class ApplyRetrySpec(val maxRetries: Int? = null, val initialBackoff: String? = null, val claimTtl: String? = null)

Applies a retry spec to the entry (wow.ledger.ApplyRetrySpec, 9.x ApplyRetrySpec): at most maxRetries automatic retries, the first initialBackoff after the failure, each claiming the entry for claimTtl (PT3M or 3m). A member left out keeps the value the entry is retried by now. The host refuses a negative count and a duration Kotlin cannot read at admission (wow.command.invalid, each under its member's path).

Link copied to clipboard
@Summary(value = "A retry spec was requested")
data class ApplyRetrySpecRequested(val maxRetries: Int? = null, val initialBackoff: String? = null, val claimTtl: String? = null)

An operator asked the owning service to apply a retry spec to the entry; see ApplyRetrySpec.

Link copied to clipboard
data class EntryAggregate(val context: String, val name: String, val tenantId: String, val id: String)

A parked aggregate as a ledger record names it: the aggregate name of context, its tenantId and id.

Link copied to clipboard
data class EntryRetrySpec(val maxRetries: Int, val initialBackoff: String, val claimTtl: String, val applied: Boolean = false)

The retry spec a parked entry is retried by: at most maxRetries automatic retries, the first initialBackoff after the failure, each claiming the entry for claimTtl (durations); applied when an operator applied it.

Link copied to clipboard
@Summary(value = "Mark a parked entry recoverable or not")
data class MarkRecoverable(val recoverable: String)

Marks the entry recoverable (wow.ledger.MarkRecoverable, 9.x MarkRecoverable): recoverable, unrecoverable or unknown; an unrecoverable entry is not retried automatically.

Link copied to clipboard
@Summary(value = "A recoverable mark was requested")
data class MarkRecoverableRequested(val recoverable: String)

An operator asked the owning service to mark the entry recoverable.

Link copied to clipboard
data class ParkedEntry(val service: String, val context: String, val subscription: String, val aggregate: EntryAggregate, val fromVersion: Int, val fromPosition: Long? = null, val reason: String, val failedAt: Long, val retries: Int = 0, val retryAt: Long? = null, val retrySpec: EntryRetrySpec, val recoverable: String = UNKNOWN, val request: String? = null, val status: String, val nextRetryAt: Long? = null, val recordedAt: Long)

subscription of service parks aggregate, as its ledger holds it now: where (fromVersion, fromPosition), why and when it last failed (reason, failedAt), its retries and the last one's start (retryAt), the retrySpec it is retried by and its nextRetryAt, what an operator marked it (recoverable) or asked of it (request), its status (scheduled, exhausted or unrecoverable) and when the service published it (recordedAt); the entry's command topic is context's.

Link copied to clipboard
@Summary(value = "A parked entry was recorded")
data class ParkedRecorded(val entry: ParkedEntry)

The owning service published its entry as entry says: parked, as its ledger holds it now.

Link copied to clipboard
data class ParkedResolution(val service: String, val context: String, val subscription: String, val aggregate: EntryAggregate, val failedAt: Long? = null, val outcome: String, val resolvedAt: Long)

subscription of service no longer parks aggregate, as of resolvedAt: the parking that failed at failedAt came to outcome (RETRIED, SKIPPED, RESOLVED or NOT_PARKED).

Link copied to clipboard
@Summary(value = "A parked entry was resolved")
data class ParkedResolved(val outcome: String, val failedAt: Long? = null, val resolvedAt: Long)

The owning service published that its entry is no longer parked, as of resolvedAt: the parking that failed at failedAt came to outcome (retried, skipped, resolved or not-parked).

Link copied to clipboard

Where an entry is, as the ops view shows it: its ledger's status while parked, then RESOLVED.

Link copied to clipboard
@Summary(value = "Record an action the owning service refused")
data class RecordActionRefused(val action: String, val code: String, val reason: String)

The owning service refused the ledger's system command action (wow.ledger.Retry, ...) the ops saga sent it for an operator's request on the entry, with the error code and reason of its rejection: its receipt came back to the saga, which records it here, so the console shows why the request came to nothing. Only the saga sends it: internal.

Link copied to clipboard
@Summary(value = "Record a parked entry")
data class RecordParked(val entry: ParkedEntry)

The owning service publishes its entry as it stands: the ParkedEntry its runtime sends, as the member Ledger.ENTRY. It creates the entry's aggregate the first time. Only the services' ledgers send it, through the ops command topic: it is internal, and no public route serves it.

Link copied to clipboard
@Summary(value = "Record a resolved entry")
data class RecordResolved(val resolution: ParkedResolution)

The owning service publishes that its entry is resolved: the ParkedResolution, as the member Ledger.RESOLUTION. Internal, as RecordParked is.

Link copied to clipboard
@Summary(value = "Retry a parked entry")
data class Retry(val reason: String? = null, val failedAt: Long? = null)

Handles the parked aggregate again from where it is parked (wow.ledger.Retry): the parking at failedAt, the entry's failedAt as the console showed it, when given; another parking refuses it as stale.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FIELD])
@Constraint(validatedBy = [RetryDuration.Validator::class])
annotation class RetryDuration(val message: String = "must be a duration such as PT3M, 3m or 1h 30m, not negative", val groups: Array<KClass<*>> = [], val payload: Array<KClass<out Payload>> = [])

A retry spec's duration, as the owning service reads it: Kotlin's Duration.parse of the trimmed text, ISO-8601 (PT3M, P1DT2H) or Kotlin's own format (3m, 1h 30m, 1h30m), finite and not negative. A member left out (null) is valid: it keeps the duration the entry is retried by now.

Link copied to clipboard
@Summary(value = "A retry was requested")
data class RetryRequested(val reason: String? = null, val failedAt: Long? = null)

An operator asked the owning service to retry the entry's parking at failedAt, for reason.

Link copied to clipboard
@Summary(value = "Skip a parked entry")
data class Skip(val reason: String? = null, val failedAt: Long? = null)

Resolves the entry without handling what was parked (wow.ledger.Skip): the parking at failedAt, as for Retry.

Link copied to clipboard
@Summary(value = "A skip was requested")
data class SkipRequested(val reason: String? = null, val failedAt: Long? = null)

An operator asked the owning service to skip the entry's parking at failedAt, for reason.