#include <userver/ydb/coordination.hpp>
Coordination Session.
Definition at line 22 of file coordination.hpp.
Public Member Functions | |
std::uint64_t | GetSessionId () |
Get session id. | |
NYdb::NCoordination::ESessionState | GetSessionState () |
Get session state. | |
NYdb::NCoordination::EConnectionState | GetConnectionState () |
Get connection state. | |
void | Close () |
Close session. | |
void | Ping () |
Ping. | |
void | Reconnect () |
Reconnect session. | |
bool | AcquireSemaphore (std::string_view name, const NYdb::NCoordination::TAcquireSemaphoreSettings &settings) |
bool | ReleaseSemaphore (std::string_view name) |
Release semaphore. | |
NYdb::NCoordination::TSemaphoreDescription | DescribeSemaphore (std::string_view name, const NYdb::NCoordination::TDescribeSemaphoreSettings &settings) |
void | CreateSemaphore (std::string_view name, std::uint64_t limit) |
Create semaphore. | |
void | UpdateSemaphore (std::string_view name, std::string_view data) |
Update semaphore. | |
void | DeleteSemaphore (std::string_view name) |
Delete semaphore. | |
bool ydb::CoordinationSession::AcquireSemaphore | ( | std::string_view | name, |
const NYdb::NCoordination::TAcquireSemaphoreSettings & | settings ) |
Acquire semaphore
TAcquireSemaphoreSettings::OnAccepted
callback with care, it will be executed on a non-coroutine thread NYdb::NCoordination::TSemaphoreDescription ydb::CoordinationSession::DescribeSemaphore | ( | std::string_view | name, |
const NYdb::NCoordination::TDescribeSemaphoreSettings & | settings ) |
Describe semaphore
TDescribeSemaphoreSettings::OnChanged
callback with care, it will be executed on a non-coroutine thread