⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
userver
C++ Async Framework v2.0
Documentation
API Groups
Namespaces
Reference
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
w
y
Variables
k
n
r
u
w
Typedefs
c
d
h
m
n
o
p
s
t
u
v
Enumerations
a
b
c
d
f
h
i
l
o
p
r
s
t
u
v
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
Related Symbols
File List
File Members
All
e
i
l
r
t
u
Functions
Macros
e
i
l
r
t
u
Examples
Toggle main menu visibility
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Concepts
Loading...
Searching...
No Matches
All results
dist_lock_settings.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/dist_lock/dist_lock_settings.hpp
4
/// @brief @copybrief dist_lock::DistLockSettings
5
6
#
include
<
chrono
>
7
8
USERVER_NAMESPACE_BEGIN
9
10
/// @brief Distributed locking
11
namespace
dist_lock
{
12
13
/// Distributed lock settings
14
struct
DistLockSettings
{
15
/// How often to try to acquire the lock.
16
std::chrono::milliseconds
acquire_interval
{100};
17
18
/// How often to try to prolong the lock while holding the lock.
19
std::chrono::milliseconds
prolong_interval
{100};
20
21
/// For how long to acquire/prolong the lock.
22
std::chrono::milliseconds
lock_ttl
{1000};
23
24
/// How much time we allow for the worker to stop when we're unable to prolong
25
/// the lock.
26
std::chrono::milliseconds
forced_stop_margin
{50};
27
28
/// Delay before failed worker_func restart
29
std::chrono::milliseconds
worker_func_restart_delay
{100};
30
};
31
32
/// Distributed lock waiting mode
33
enum
class
DistLockWaitingMode
{
34
kWait
,
///< waits until distlock becomes free
35
kNoWait
,
///< doesn't wait for distlock if it is occupied
36
};
37
38
/// Distributed lock retry strategy
39
enum
class
DistLockRetryMode
{
40
kRetry
,
///< Retry on user exception/lock drop
41
kSingleAttempt
,
///< Don't retry on user exception/lock drop
42
};
43
44
}
// namespace dist_lock
45
46
USERVER_NAMESPACE_END
Docs version:
v1.0
,
v2.0
,
trunk/develop
userver
dist_lock
dist_lock_settings.hpp
Generated on Wed May 15 2024 22:17:47 for userver by
Doxygen
1.10.0