#include <userver/dist_lock/dist_lock_settings.hpp>
Distributed lock settings.
Definition at line 14 of file dist_lock_settings.hpp.
Public Attributes | |
| std::chrono::milliseconds | acquire_interval {100} |
| How often to try to acquire the lock. | |
| std::chrono::milliseconds | prolong_interval {100} |
| How often to try to prolong the lock while holding the lock. | |
| std::chrono::milliseconds | lock_ttl {1000} |
| For how long to acquire/prolong the lock. | |
| std::chrono::milliseconds | forced_stop_margin {50} |
| std::chrono::milliseconds | worker_func_restart_delay {100} |
| Delay before failed worker_func restart. | |
| bool | is_enabled {true} |
| std::chrono::milliseconds dist_lock::DistLockSettings::acquire_interval {100} |
How often to try to acquire the lock.
Definition at line 16 of file dist_lock_settings.hpp.
| std::chrono::milliseconds dist_lock::DistLockSettings::forced_stop_margin {50} |
How much time we allow for the worker to stop when we're unable to prolong the lock.
Definition at line 26 of file dist_lock_settings.hpp.
| bool dist_lock::DistLockSettings::is_enabled {true} |
Defaults to true and is updated from dynamic config. When switched to false, dist_lock::DistLockedWorker will not start any new distributed lock acquisition attempts. If a DoWork invocation is already running under the lock, it is allowed to finish without forced cancellation. In this case dist_lock::DistLockedWorker::IsCancelAdvised returns true.
Definition at line 35 of file dist_lock_settings.hpp.
| std::chrono::milliseconds dist_lock::DistLockSettings::lock_ttl {1000} |
For how long to acquire/prolong the lock.
Definition at line 22 of file dist_lock_settings.hpp.
| std::chrono::milliseconds dist_lock::DistLockSettings::prolong_interval {100} |
How often to try to prolong the lock while holding the lock.
Definition at line 19 of file dist_lock_settings.hpp.
| std::chrono::milliseconds dist_lock::DistLockSettings::worker_func_restart_delay {100} |
Delay before failed worker_func restart.
Definition at line 29 of file dist_lock_settings.hpp.