mongo::MongoMutex Class Reference

#include <mongomutex.h>

List of all members.

Public Member Functions

void assertAtLeastReadLocked () const
void assertWriteLocked () const
bool atLeastReadLocked () const
int getState () const
MutexInfoinfo ()
bool isWriteLocked () const
void lock ()
void lock_shared ()
bool lock_shared_try (int millis)
bool lock_try (int millis)
 MongoMutex (const char *name)
void releaseEarly ()
void unlock ()
void unlock_shared ()

Public Attributes

bool _remapPrivateViewRequested

Private Member Functions

void _acquiredWriteLock ()
void _releasingWriteLock ()
bool _writeLockedAlready ()

Private Attributes

RWLock _m
MutexInfo _minfo
ThreadLocalValue< bool > _releasedEarly
ThreadLocalValue< int > _state

Detailed Description

the 'big lock' we use for most operations. a read/write lock. there is one of these, dbMutex.

generally if you need to declare a mutex use the right primitive class, not this.

use readlock and writelock classes for scoped locks on this rather than direct manipulation.

Definition at line 33 of file mongomutex.h.


Constructor & Destructor Documentation

mongo::MongoMutex::MongoMutex ( const char *  name  ) 

Member Function Documentation

void mongo::MongoMutex::_acquiredWriteLock (  )  [inline, private]

Definition at line 221 of file mongomutex.h.

void mongo::MongoMutex::_releasingWriteLock (  )  [inline, private]

Definition at line 217 of file mongomutex.h.

bool mongo::MongoMutex::_writeLockedAlready (  )  [inline, private]

Definition at line 229 of file mongomutex.h.

void mongo::MongoMutex::assertAtLeastReadLocked (  )  const [inline]

Definition at line 45 of file mongomutex.h.

void mongo::MongoMutex::assertWriteLocked (  )  const [inline]

Definition at line 47 of file mongomutex.h.

bool mongo::MongoMutex::atLeastReadLocked (  )  const [inline]

Definition at line 44 of file mongomutex.h.

int mongo::MongoMutex::getState (  )  const [inline]
Returns:
> 0 write lock = 0 no lock < 0 read lock

Definition at line 42 of file mongomutex.h.

MutexInfo& mongo::MongoMutex::info (  )  [inline]

Definition at line 176 of file mongomutex.h.

bool mongo::MongoMutex::isWriteLocked (  )  const [inline]

Definition at line 46 of file mongomutex.h.

void mongo::MongoMutex::lock (  )  [inline]

Definition at line 53 of file mongomutex.h.

void mongo::MongoMutex::lock_shared (  )  [inline]

Definition at line 121 of file mongomutex.h.

bool mongo::MongoMutex::lock_shared_try ( int  millis  )  [inline]

Definition at line 142 of file mongomutex.h.

bool mongo::MongoMutex::lock_try ( int  millis  )  [inline]

Definition at line 71 of file mongomutex.h.

void mongo::MongoMutex::releaseEarly (  )  [inline]

Definition at line 113 of file mongomutex.h.

void mongo::MongoMutex::unlock (  )  [inline]

Definition at line 90 of file mongomutex.h.

void mongo::MongoMutex::unlock_shared (  )  [inline]

Definition at line 160 of file mongomutex.h.


Member Data Documentation

Definition at line 185 of file mongomutex.h.

Definition at line 192 of file mongomutex.h.

Definition at line 202 of file mongomutex.h.

Definition at line 196 of file mongomutex.h.

Definition at line 190 of file mongomutex.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mongodb
Author(s): Nate Koenig
autogenerated on Fri Jan 11 12:15:56 2013