userver: dist_lock Namespace Reference
Loading...
Searching...
No Matches
dist_lock Namespace Reference

Detailed Description

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
 
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  Statistics
 

Enumerations

enum class  DistLockWaitingMode {
  kWait ,
  kNoWait
}
 Distributed lock waiting mode. More...
 
enum class  DistLockRetryMode {
  kRetry ,
  kSingleAttempt
}
 Distributed lock retry strategy. More...
 

Functions

void DumpMetric (utils::statistics::Writer &writer, const DistLockedWorker &worker)
 

Enumeration Type Documentation

◆ DistLockRetryMode

enum class dist_lock::DistLockRetryMode
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 39 of file dist_lock_settings.hpp.

◆ DistLockWaitingMode

enum class dist_lock::DistLockWaitingMode
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 33 of file dist_lock_settings.hpp.