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

Global exclusive lock. More...

#include <d_concurrency.h>

Inheritance diagram for mongo::Lock::GlobalWrite:
mongo::Lock::GlobalLock

Detailed Description

Global exclusive lock.

Allows exclusive write access to all databases and collections, blocking all other access. Allows further (recursive) acquisition of the global lock in any mode, see LockMode.

Public Member Functions

 GlobalWrite (OperationContext *opCtx)
 
 GlobalWrite (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

◆ GlobalWrite() [1/2]

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

◆ GlobalWrite() [2/2]

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

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