132 bool checkDeadlock) {
199 virtual bool isW()
const {
203 virtual bool isR()
const {
virtual bool hasLockPending() const
Pending means we are currently trying to get a lock (could be the parallel batch writer lock)...
Definition: locker_noop.h:221
Interface for acquiring locks.
Definition: locker.h:47
void unsetMaxLockTimeout() override
Clears the max lock timeout override set by setMaxLockTimeout() above.
Definition: locker_noop.h:80
virtual void reacquireTicket(OperationContext *opCtx)
Reacquires a ticket for the Locker.
Definition: locker_noop.h:191
virtual LockResult lockGlobalComplete(Date_t deadline)
Definition: locker_noop.h:104
Collection *const const NamespaceString & ns
Definition: collection_info_cache_impl.cpp:53
virtual bool isDbLockedForMode(StringData dbName, LockMode mode) const
Definition: locker_noop.h:156
virtual void downgrade(ResourceId resId, LockMode newMode)
Downgrades the specified resource's lock mode without changing the reference count.
Definition: locker_noop.h:140
virtual bool unlockGlobal()
Decrements the reference count on the global lock.
Definition: locker_noop.h:112
Copyright (C) 2014 MongoDB Inc.
Definition: bson_collection_catalog_entry.cpp:38
virtual bool isR() const
Definition: locker_noop.h:203
uint64_t LockerId
Definition: lock_manager_defs.h:246
virtual void getLockerInfo(LockerInfo *lockerInfo) const
Definition: locker_noop.h:168
virtual LockResult lockGlobal(LockMode mode)
Definition: locker_noop.h:88
Returns information and locking statistics for this instance of the locker.
Definition: locker.h:319
virtual void dump() const
Definition: locker_noop.h:195
virtual LockMode getLockMode(ResourceId resId) const
Retrieves the mode in which a lock is held or checks whether the lock held for a particular resource ...
Definition: locker_noop.h:148
Uniquely identifies a lockable resource.
Definition: lock_manager_defs.h:176
virtual void endWriteUnitOfWork()
Definition: locker_noop.h:122
virtual LockResult lock(OperationContext *opCtx, ResourceId resId, LockMode mode, Date_t deadline, bool checkDeadlock)
Acquires lock on the specified resource in the specified mode and returns the outcome of the operatio...
Definition: locker_noop.h:128
virtual LockerId getId() const
Definition: locker_noop.h:52
virtual LockResult lockGlobalBegin(LockMode mode, Date_t deadline)
Definition: locker_noop.h:96
virtual bool isNoop() const
Returns true if this is an instance of LockerNoop.
Definition: locker_noop.h:44
void setMaxLockTimeout(Milliseconds maxTimeout) override
This is useful to ensure that potential deadlocks do not occur.
Definition: locker_noop.h:72
LockResult
Return values for the locking functions of the lock manager.
Definition: lock_manager_defs.h:99
LockMode
Lock modes.
Definition: lock_manager_defs.h:59
virtual void restoreLockState(OperationContext *opCtx, const LockSnapshot &stateToRestore)
Re-locks all locks whose state was stored in 'stateToRestore'.
Definition: locker_noop.h:180
virtual void releaseTicket()
Releases the ticket associated with the Locker.
Definition: locker_noop.h:187
ClientState
State for reporting the number of active and queued reader and writer clients.
Definition: locker.h:79
virtual boost::optional< LockerInfo > getLockerInfo() const
Returns boost::none if this is an instance of LockerNoop, or a populated LockerInfo otherwise...
Definition: locker_noop.h:172
virtual void beginWriteUnitOfWork()
beginWriteUnitOfWork/endWriteUnitOfWork are called at the start and end of WriteUnitOfWorks.
Definition: locker_noop.h:120
virtual void restoreLockState(const LockSnapshot &stateToRestore)
Definition: locker_noop.h:183
virtual LockResult lockGlobalBegin(OperationContext *opCtx, LockMode mode, Date_t deadline)
Requests the global lock to be acquired in the specified mode.
Definition: locker_noop.h:92
virtual bool isWriteLocked() const
Definition: locker_noop.h:213
LockerNoop()
Definition: locker_noop.h:42
virtual bool isLocked() const
Definition: locker_noop.h:207
virtual bool isLockHeldForMode(ResourceId resId, LockMode mode) const
Definition: locker_noop.h:152
The lock request was granted and is now on the granted list for the specified resource.
Definition: lock_manager_defs.h:104
stdx::thread::id getThreadId() const override
Get a platform-specific thread identifier of the thread which owns the this locker for tracing purpos...
Definition: locker_noop.h:56
virtual ResourceId getWaitingResource() const
Returns the resource that this locker is waiting/blocked on (if any).
Definition: locker_noop.h:164
virtual ClientState getClientState() const
Return whether client is holding any locks (active), or is queued on any locks or waiting for a ticke...
Definition: locker_noop.h:48
virtual LockResult lock(ResourceId resId, LockMode mode, Date_t deadline, bool checkDeadlock)
Calling lock without an OperationContext does not allow LOCK_WAITING states to be interrupted...
Definition: locker_noop.h:136
virtual bool saveLockStateAndUnlock(LockSnapshot *stateOut)
Retrieves all locks held by this transaction, other than RESOURCE_MUTEX locks, and what mode they're ...
Definition: locker_noop.h:176
virtual bool isCollectionLockedForMode(StringData ns, LockMode mode) const
Definition: locker_noop.h:160
virtual LockResult lockGlobalComplete(OperationContext *opCtx, Date_t deadline)
Calling lockGlobalComplete without an OperationContext does not allow the lock acquisition to be inte...
Definition: locker_noop.h:100
virtual bool unlock(ResourceId resId)
Releases a lock previously acquired through a lock call.
Definition: locker_noop.h:144
LockSnapshot captures the state of all resources that are locked, what modes they're locked in...
Definition: locker.h:342
virtual LockResult lockGlobal(OperationContext *opCtx, LockMode mode)
This should be the first method invoked for a particular Locker object.
Definition: locker_noop.h:84
virtual void lockMMAPV1Flush()
This method is used only in the MMAP V1 storage engine, otherwise it is a no-op.
Definition: locker_noop.h:108
bool hasMaxLockTimeout() override
Returns whether this Locker has a maximum lock timeout set.
Definition: locker_noop.h:76
virtual bool inAWriteUnitOfWork() const
Definition: locker_noop.h:124
void updateThreadIdToCurrentThread() override
Updates any cached thread id values to represent the current thread.
Definition: locker_noop.h:60
Collection *const OperationContext *const opCtx
Definition: collection_impl.cpp:80
Locker, which cannot be used to lock/unlock resources and just returns true for checks for whether a ...
Definition: locker_noop.h:40
void unsetThreadId() override
Clears any cached thread id values.
Definition: locker_noop.h:64
virtual bool isW() const
Definition: locker_noop.h:199
virtual void downgradeGlobalXtoSForMMAPV1()
This is only necessary for the MMAP V1 engine and in particular, the fsyncLock command which needs to...
Definition: locker_noop.h:116
void setSharedLocksShouldTwoPhaseLock(bool sharedLocksShouldTwoPhaseLock) override
Indicate that shared locks should participate in two-phase locking for this Locker instance...
Definition: locker_noop.h:68
virtual bool isReadLocked() const
Definition: locker_noop.h:217
bool isGlobalLockedRecursively() override
Definition: locker_noop.h:225