MongoDB  2.7.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
mongo::MongoFile Class Referenceabstract
Inheritance diagram for mongo::MongoFile:
mongo::MemoryMappedFile

Classes

class  Flushable
 Flushable has to fail nicely if the underlying object gets killed. More...
 

Public Types

enum  Options { SEQUENTIAL = 1, READONLY = 2 }
 

Public Member Functions

virtual bool isDurableMappedFile ()
 
string filename () const
 
void setFilename (const std::string &fn)
 
virtual uint64_t getUniqueId () const =0
 

Static Public Member Functions

template<class F >
static void forEach (F fun)
 p is called from within a mutex that MongoFile uses. More...
 
static std::set< MongoFile * > & getAllFiles ()
 note: you need to be in mmmutex when using this. More...
 
static int flushAll (bool sync)
 
static long long totalMappedLength ()
 
static void closeAllFiles (std::stringstream &message)
 

Static Public Attributes

static void(* notifyPreFlush )() = nullFunc
 
static void(* notifyPostFlush )() = nullFunc
 

Protected Member Functions

virtual void close ()=0
 
virtual void flush (bool sync)=0
 
virtual FlushableprepareFlush ()=0
 returns a thread safe object that you can call flush on Flushable has to fail nicely if the underlying object gets killed
 
void created ()
 
void destroyed ()
 
virtual unsigned long long length () const =0
 

Member Function Documentation

template<class F >
void mongo::MongoFile::forEach ( p)
inlinestatic

p is called from within a mutex that MongoFile uses.

Parameters
funis called for each MongoFile. called from within a mutex that MongoFile uses. so be careful not to deadlock.

so be careful not to deadlock.

set< MongoFile * > & mongo::MongoFile::getAllFiles ( )
static

note: you need to be in mmmutex when using this.

forEach (above) handles that for you automatically.


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