Distributed locking.
Classes | |
| class | DistLockedTask |
| A task that tries to acquire a distributed lock and runs user callback once while the lock is held. More... | |
| class | DistLockedWorker |
| Perpetually acquires a distributed lock and runs a callback while it is held and runs user callback in a separate task while the lock is held. Cancels the task when the lock is lost. More... | |
| struct | DistLockFallbackSettings |
| Fallback policy shared by all lock participants, including release history. More... | |
| struct | DistLockSettings |
| Distributed lock settings. More... | |
| class | DistLockStrategyBase |
| Interface for distributed lock strategies. More... | |
| class | LockIsAcquiredByAnotherHostException |
| Indicates that lock cannot be acquired because it's busy. More... | |
| struct | LockOperationOptions |
| Parameters for dist_lock::DistLockStrategyBase::ExecuteOperation. More... | |
| struct | ReleaseOptions |
| Parameters for dist_lock::DistLockStrategyBase::Release. More... | |
| struct | Statistics |
| Distributed lock worker statistics counters. More... | |
Enumerations | |
| enum class | DistLockWaitingMode { kWait , kNoWait } |
| Distributed lock waiting mode. More... | |
| enum class | DistLockRetryMode { kRetry , kSingleAttempt } |
| Distributed lock retry strategy. More... | |
| enum class | LockOperation { kAcquire , kProlong , kCheck , kFallback } |
| Operation performed by dist_lock::DistLockStrategyBase::ExecuteOperation. More... | |
| enum class | LockOperationResult { kAcquired , kBusy , kNotAlive , kUnsupported } |
| Expected outcome of a distributed lock operation. Backend failures still throw. More... | |
Functions | |
| void | DumpMetric (utils::statistics::Writer &writer, const DistLockedWorker &worker) |
|
strong |
Distributed lock retry strategy.
| Enumerator | |
|---|---|
| kRetry | Retry on user exception/lock drop. |
| kSingleAttempt | Don't retry on user exception/lock drop. |
Definition at line 70 of file dist_lock_settings.hpp.
|
strong |
Distributed lock waiting mode.
| Enumerator | |
|---|---|
| kWait | waits until distlock becomes free |
| kNoWait | doesn't wait for distlock if it is occupied |
Definition at line 64 of file dist_lock_settings.hpp.
|
strong |
Operation performed by dist_lock::DistLockStrategyBase::ExecuteOperation.
Definition at line 18 of file dist_lock_strategy.hpp.
|
strong |
Expected outcome of a distributed lock operation. Backend failures still throw.
Definition at line 26 of file dist_lock_strategy.hpp.