Storage Engine API
mongo::LockRequest Struct Reference

There is one of those entries per each request for a lock. More...

#include <lock_manager_defs.h>

Inheritance diagram for mongo::LockRequest:
mongo::LockRequestCombo

Detailed Description

There is one of those entries per each request for a lock.

They hang on a linked list off the LockHead or off a PartitionedLockHead and also are in a map for each Locker. This structure is not thread-safe.

LockRequest are owned by the Locker class and it controls their lifetime. They should not be deleted while on the LockManager though (see the contract for the lock/unlock methods).

Public Types

enum  Status {
  STATUS_NEW, STATUS_GRANTED, STATUS_WAITING, STATUS_CONVERTING,
  StatusCount
}
 

Public Member Functions

void initNew (Locker *locker, LockGrantNotification *notify)
 Used for initialization of a LockRequest, which might have been retrieved from cache. More...
 

Public Attributes

Locker * locker
 
LockGrantNotification * notify
 
bool enqueueAtFront
 
bool compatibleFirst
 
bool partitioned
 
unsigned recursiveCount
 
LockHead * lock
 
PartitionedLockHead * partitionedLock
 
LockRequest * prev
 
LockRequest * next
 
Status status
 
LockMode mode
 
LockMode convertMode
 
unsigned unlockPending = 0
 

Member Enumeration Documentation

◆ Status

Enumerator
STATUS_NEW 
STATUS_GRANTED 
STATUS_WAITING 
STATUS_CONVERTING 
StatusCount 

Member Function Documentation

◆ initNew()

void mongo::LockRequest::initNew ( Locker *  locker,
LockGrantNotification *  notify 
)

Used for initialization of a LockRequest, which might have been retrieved from cache.

Member Data Documentation

◆ compatibleFirst

bool mongo::LockRequest::compatibleFirst

◆ convertMode

LockMode mongo::LockRequest::convertMode

◆ enqueueAtFront

bool mongo::LockRequest::enqueueAtFront

◆ lock

LockHead* mongo::LockRequest::lock

◆ locker

Locker* mongo::LockRequest::locker

◆ mode

LockMode mongo::LockRequest::mode

◆ next

LockRequest* mongo::LockRequest::next

◆ notify

LockGrantNotification* mongo::LockRequest::notify

◆ partitioned

bool mongo::LockRequest::partitioned

◆ partitionedLock

PartitionedLockHead* mongo::LockRequest::partitionedLock

◆ prev

LockRequest* mongo::LockRequest::prev

◆ recursiveCount

unsigned mongo::LockRequest::recursiveCount

◆ status

Status mongo::LockRequest::status

◆ unlockPending

unsigned mongo::LockRequest::unlockPending = 0

The documentation for this struct was generated from the following files: