MongoDB  2.7.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
mongo::MemoryMappedFile Class Reference
Inheritance diagram for mongo::MemoryMappedFile:

Public Member Functions

virtual void close ()
void * map (const char *filename)
void * mapWithOptions (const char *filename, int options)
void * map (const char *filename, unsigned long long &length, int options=0)
void * create (const std::string &filename, unsigned long long len, bool zero)
void flush (bool sync)
virtual FlushableprepareFlush ()
 returns a thread safe object that you can call flush on Flushable has to fail nicely if the underlying object gets killed
long shortLength () const
unsigned long long length () const
HANDLE getFd () const
void * createReadOnlyMap ()
 create a new view with the specified properties. More...
void * createPrivateMap ()
virtual uint64_t getUniqueId () const
- Public Member Functions inherited from mongo::MongoFile
virtual bool isDurableMappedFile ()
string filename () const
void setFilename (const std::string &fn)

Static Public Member Functions

static void makeWritable (void *, unsigned len)
 make the private map range writable (necessary for our windows implementation)
- Static Public Member Functions inherited from mongo::MongoFile
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)

Protected Member Functions

virtual void * viewForFlushing ()
void * remapPrivateView (void *oldPrivateAddr)
 close the current private view and open a new replacement
- Protected Member Functions inherited from mongo::MongoFile
void created ()
void destroyed ()

Additional Inherited Members

- Public Types inherited from mongo::MongoFile
enum  Options { SEQUENTIAL = 1, READONLY = 2 }
- Static Public Attributes inherited from mongo::MongoFile
static void(* notifyPreFlush )() = nullFunc
static void(* notifyPostFlush )() = nullFunc

Member Function Documentation

void * mongo::MemoryMappedFile::createReadOnlyMap ( )

create a new view with the specified properties.

automatically cleaned up upon close/destruction of the MemoryMappedFile object.

void * mongo::MemoryMappedFile::mapWithOptions ( const char *  filename,
int  options 
optionssee MongoFile::Options

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