C++ YT Wrapper
C++ library for working with YT clusters
Loading...
Searching...
No Matches
NYT::ILock Class Referenceabstract

Interface representing a lock obtained from NYT::ITransaction::Lock. More...

#include <client.h>

Inheritance diagram for NYT::ILock:

Public Member Functions

virtual const TLockId & GetId () const =0
 Get cypress node id of lock itself.
virtual TNodeId GetLockedNodeId () const =0
 Get cypress node id of locked object.
virtual const ::NThreading::TFuture< void > & GetAcquiredFuture () const =0
 Get future that will be set once lock is in "acquired" state.
void Wait (TDuration timeout=TDuration::Max())
 Wait until lock is in "acquired" state.

Detailed Description

Interface representing a lock obtained from NYT::ITransaction::Lock.

See also
YT doc

Member Function Documentation

◆ GetAcquiredFuture()

virtual const ::NThreading::TFuture< void > & NYT::ILock::GetAcquiredFuture ( ) const
pure virtual

Get future that will be set once lock is in "acquired" state.

Note that future might contain exception if some error occurred e.g. lock transaction was aborted.

◆ Wait()

void NYT::ILock::Wait ( TDuration timeout = TDuration::Max())

Wait until lock is in "acquired" state.

Throws exception if timeout exceeded or some error occurred e.g. lock transaction was aborted.


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