Lease

class Lease @InternalWowApi constructor(val group: String, val partition: Int, val owner: String, val epoch: Long, val expiresAt: Long)

owner holds partition for subscription group group until expiresAt (epoch milliseconds, exclusive).

epoch counts the acquisitions of the partition: each time it changes hands, or its owner takes it back after it expired or was released, the epoch is one more. Wow does not fence on it; it shows handovers in metrics and tests.

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

Constructors

Link copied to clipboard
constructor(group: String, partition: Int, owner: String, epoch: Long, expiresAt: Long)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val epoch: Long
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun copyWith(group: String = this.group, partition: Int = this.partition, owner: String = this.owner, epoch: Long = this.epoch, expiresAt: Long = this.expiresAt): Lease

This Lease 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
open override fun toString(): String