Package-level declarations

Types

Link copied to clipboard
data class AcquireOptions @JvmOverloads constructor(val wait: WaitMode = WaitMode.DoNotWait, val unsupportedWaitBehavior: UnsupportedWaitBehavior = UnsupportedWaitBehavior.Fail)
Link copied to clipboard
class AutoCloseableLease @JvmOverloads constructor(lease: Lease, lazy: Boolean = false) : Lease, AutoCloseable

Converts a lease into an AutoCloseable resource.

Link copied to clipboard

A marker interface for LeaseManager implementations that provide leader election functionality across service instances (e.g. first-come first-serve, quorum).

Link copied to clipboard
interface Lease

A Lease is a cluster-wide, time-based lock on a given resource. Leases are retrieved via LeaseManager.requestLease.

Link copied to clipboard
interface LeaseManager
Link copied to clipboard

A marker interface for LeaseManager implementations that provide load-balanced lease distribution across service instances (e.g. consistent hashing).

Link copied to clipboard

A marker interface for LeaseManager implementations that use persistent storage to manage leases across service restarts and failures.

Link copied to clipboard
sealed interface WaitMode

Functions

Link copied to clipboard

Attempts to acquire an AutoCloseableLease.

Attempts to acquire an AutoCloseableLease with options.