Reservation

class Reservation @InternalWowApi constructor(val scope: ReservationScope, val key: String, val owner: AggregateRef, val expiresAt: Long?, val holds: Set<String> = emptySet(), val version: Int = ReservationStore.UNVERSIONED)

owner's reservation of key in scope. A pending reservation expires at expiresAt (epoch milliseconds) and is held by the attempts in holds; a confirmed one has no expiry and no holds, and version is the version of the owner's fact that last confirmed it (ReservationStore.UNVERSIONED for a pending one). Its owner is an aggregate of the scope's type.

Fields may be added: construct one with of; the constructor is internal to Wow.

Constructors

Link copied to clipboard
constructor(scope: ReservationScope, key: String, owner: AggregateRef, expiresAt: Long?, holds: Set<String> = emptySet(), version: Int = ReservationStore.UNVERSIONED)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Whether the reservation is permanent.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val key: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun copyWith(scope: ReservationScope = this.scope, key: String = this.key, owner: AggregateRef = this.owner, expiresAt: Long? = this.expiresAt, holds: Set<String> = this.holds, version: Int = this.version): Reservation

This Reservation with the given fields replaced: Wow's own copy, left out of the ABI.

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
fun isLive(now: Long): Boolean

Whether the reservation still holds its key at now (epoch milliseconds).

Link copied to clipboard
open override fun toString(): String