Liking cljdoc? Tell your friends :D

wagoe.platform.lease

A lease row that replicas take turns holding, timed by the database clock so replica clock skew cannot split it. A holder paused past lease-ms may overlap the next one until it notices; callers whose work must not run twice guard it separately.

A lease row that replicas take turns holding, timed by the database clock
so replica clock skew cannot split it. A holder paused past `lease-ms` may
overlap the next one until it notices; callers whose work must not run twice
guard it separately.
raw docstring

claim!clj

(claim! {:keys [ds lease-name claim-sql]} owner lease-ms)

Take the lease for owner, or renew it, for lease-ms. True when held. owner is at most 36 characters: older tables were made with that width.

Take the lease for `owner`, or renew it, for `lease-ms`. True when held.
`owner` is at most 36 characters: older tables were made with that width.
sourceraw docstring

create-leaseclj

(create-lease ds table lease-name)

The lease lease-name in table on ds. Call create-table! first.

The lease `lease-name` in `table` on `ds`. Call `create-table!` first.
sourceraw docstring

create-table!clj

(create-table! ds table lease-name)

Create table and its row for lease-name if absent. Safe to call from every replica at boot.

Create `table` and its row for `lease-name` if absent. Safe to call from
every replica at boot.
sourceraw docstring

release!clj

(release! {:keys [ds lease-name release-sql]} owner)

Hand the lease on, if owner holds it.

Hand the lease on, if `owner` holds it.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close