Table of Contents

Namespace DynaSharp.Coordination

Classes

Lease

A held lock: the lease that TryAcquireAsync(string, TimeSpan, CancellationToken) or AcquireAsync(string, TimeSpan, CancellationToken) handed out. It renews itself every third of its duration until it is disposed or lost, and Ended says when it ends. Dispose it to release the lock: await using var lease = ....

LeaseTransactExtensions

The fencing of a write in DynamoDB: a step of TransactWrite() that lets the transaction commit only while a lease holds its lock.

LockTable

Named locks in a DynamoDB table, each held through a Lease with a fencing token: AcquireAsync(string, TimeSpan, CancellationToken) and TryAcquireAsync(string, TimeSpan, CancellationToken) take one, RunAsLeaderAsync(string, TimeSpan, Func<Lease, CancellationToken, Task>, CancellationToken) elects a leader.

LockTableOptions

What a LockTable adds to the items of its locks: a label that tells operators which process holds a lock, and a time to live for the items of locks that are no longer used. Both are off by default, and neither is ever part of a condition, so processes with different options contend for the same locks as equals.