ParkedAmendment

sealed interface ParkedAmendment

A change of a parked entry's retry state (FailureLedger.amend), or, for Restate alone, of why it is parked and its retry state at once.

Inheritors

Types

Link copied to clipboard

Applies spec to the entry, or the subscription's spec again when null (9.x ApplyRetrySpec).

Link copied to clipboard
class ClaimRetry @InternalWowApi constructor(val revision: Long, val at: Long) : ParkedAmendment

Claims an automatic retry: when the entry is still at revision, the one read, it has made one more retry, started at (epoch milliseconds).

Link copied to clipboard
class MarkRecoverable @InternalWowApi constructor(val recoverable: Recoverable) : ParkedAmendment

Marks the entry recoverable (9.x MarkRecoverable).

Link copied to clipboard
class Request @InternalWowApi constructor(val request: LedgerRequest) : ParkedAmendment

Leaves request for the partition's owner, replacing one it has not taken yet.

Link copied to clipboard
class Restate @InternalWowApi constructor(val revision: Long, val reason: String, val failedAt: Long, val retries: Int, val retryAt: Long?, val retrySpec: ParkedRetrySpec?, val recoverable: Recoverable) : ParkedAmendment

Restates the entry as another record of the same failure holds it now: when the entry is still at revision, the one read, it is parked for reason since failedAt, with retries retries made, the last one started at retryAt, under retrySpec, marked recoverable. An operator's request stays, for the partition's owner.

Link copied to clipboard
class Schedule @InternalWowApi constructor(val revision: Long, val at: Long) : ParkedAmendment

Records when the owner of the entry's partition next looks at it: when the entry is still at revision, the one the owner read, it is scheduled at (epoch milliseconds, ParkedAggregate.NEVER for an entry that is not retried automatically). So a claim, a repark or an operator's change made since the owner read the entry is never covered by a schedule computed before it.

Link copied to clipboard
class TakeRequest @InternalWowApi constructor(val revision: Long) : ParkedAmendment

Takes the operator's request the owner read: when the entry is still at revision, the one read, it no longer holds a request.