Storage Engine API
mongo::TrackingLockGrantNotification Class Reference

#include <lock_manager_test_help.h>

Inheritance diagram for mongo::TrackingLockGrantNotification:
mongo::LockGrantNotification mongo::LockRequestCombo

Public Member Functions

 TrackingLockGrantNotification ()
 
virtual void notify (ResourceId resId, LockResult result)
 This method is invoked at most once for each lock request and indicates the outcome of the lock acquisition for the specified resource id. More...
 
- Public Member Functions inherited from mongo::LockGrantNotification
virtual ~LockGrantNotification ()
 

Public Attributes

int numNotifies
 
ResourceId lastResId
 
LockResult lastResult
 

Constructor & Destructor Documentation

◆ TrackingLockGrantNotification()

mongo::TrackingLockGrantNotification::TrackingLockGrantNotification ( )
inline

Member Function Documentation

◆ notify()

virtual void mongo::TrackingLockGrantNotification::notify ( ResourceId  resId,
LockResult  result 
)
inlinevirtual

This method is invoked at most once for each lock request and indicates the outcome of the lock acquisition for the specified resource id.

Cases where it won't be called are if a lock acquisition (be it in waiting or converting state) is cancelled through a call to unlock.

IMPORTANT: This callback runs under a spinlock for the lock manager, so the work done inside must be kept to a minimum and no locks or operations which may block should be run. Also, no methods which call back into the lock manager should be invoked from within this methods (LockManager is not reentrant).

ResourceId for which a lock operation was previously called.

Returns
Outcome of the lock operation.

Implements mongo::LockGrantNotification.

Member Data Documentation

◆ lastResId

ResourceId mongo::TrackingLockGrantNotification::lastResId

◆ lastResult

LockResult mongo::TrackingLockGrantNotification::lastResult

◆ numNotifies

int mongo::TrackingLockGrantNotification::numNotifies

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