userver: ydb::CoordinationSession Class Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
ydb::CoordinationSession Class Referencefinal

#include <userver/ydb/coordination.hpp>

Detailed Description

Coordination Session.

See also
https://ydb.tech/docs/ru/reference/ydb-sdk/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.
 

Member Function Documentation

◆ AcquireSemaphore()

bool ydb::CoordinationSession::AcquireSemaphore ( std::string_view name,
const NYdb::NCoordination::TAcquireSemaphoreSettings & settings )

Acquire semaphore

Warning
Use TAcquireSemaphoreSettings::OnAccepted callback with care, it will be executed on a non-coroutine thread

◆ DescribeSemaphore()

NYdb::NCoordination::TSemaphoreDescription ydb::CoordinationSession::DescribeSemaphore ( std::string_view name,
const NYdb::NCoordination::TDescribeSemaphoreSettings & settings )

Describe semaphore

Warning
Use TDescribeSemaphoreSettings::OnChanged callback with care, it will be executed on a non-coroutine thread

The documentation for this class was generated from the following file: