Storage Engine API
mongo::Lock::GlobalRead Class Reference

Global shared lock. More...

#include <d_concurrency.h>

Inheritance diagram for mongo::Lock::GlobalRead:
mongo::Lock::GlobalLock

Detailed Description

Global shared lock.

Allows concurrent read access to all databases and collections, blocking any writers. Allows further (recursive) acquisition of the global lock in shared (S) or intent-shared (IS) mode, see LockMode.

Public Member Functions

 GlobalRead (OperationContext *opCtx)
 
 GlobalRead (OperationContext *opCtx, Date_t deadline, InterruptBehavior behavior)
 
- Public Member Functions inherited from mongo::Lock::GlobalLock
 GlobalLock (OperationContext *opCtx, LockMode lockMode)
 A GlobalLock without a deadline defaults to Date_t::max() and an InterruptBehavior of kThrow. More...
 
 GlobalLock (OperationContext *opCtx, LockMode lockMode, Date_t deadline, InterruptBehavior behavior)
 A GlobalLock with a deadline requires the interrupt behavior to be explicitly defined. More...
 
 GlobalLock (GlobalLock &&)
 
 GlobalLock (OperationContext *opCtx, LockMode lockMode, Date_t deadline, InterruptBehavior behavior, EnqueueOnly enqueueOnly)
 Enqueues lock but does not block on lock acquisition. More...
 
 ~GlobalLock ()
 
void waitForLockUntil (Date_t deadline)
 Waits for lock to be granted. More...
 
bool isLocked () const
 

Constructor & Destructor Documentation

◆ GlobalRead() [1/2]

mongo::Lock::GlobalRead::GlobalRead ( OperationContext *  opCtx)
inlineexplicit

◆ GlobalRead() [2/2]

mongo::Lock::GlobalRead::GlobalRead ( OperationContext *  opCtx,
Date_t  deadline,
InterruptBehavior  behavior 
)
inlineexplicit

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