mongo::MongoMMF Class Reference

#include <mongommf.h>

Inheritance diagram for mongo::MongoMMF:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void close ()
bool create (string fname, unsigned long long &len, bool sequentialHint)
string filename () const
int fileSuffixNo () const
void flush (bool sync)
void * getView () const
virtual bool isMongoMMF ()
unsigned long long length () const
 MongoMMF ()
bool open (string fname, bool sequentialHint)
RelativePath relativePath () const
void remapThePrivateView ()
void * view_write () const
bool & willNeedRemap ()
virtual ~MongoMMF ()

Static Public Member Functions

static void * _switchToWritableView (void *private_ptr)

Private Member Functions

bool finishOpening ()
void setPath (string pathAndFileName)

Private Attributes

int _fileSuffixNo
RelativePath _p
void * _view_private
void * _view_write
bool _willNeedRemap

Detailed Description

MongoMMF adds some layers atop memory mapped files - specifically our handling of private views & such. if you don't care about journaling/durability (temp sort files & such) use MemoryMappedFile class, not this.

Definition at line 29 of file mongommf.h.


Constructor & Destructor Documentation

mongo::MongoMMF::MongoMMF (  ) 
virtual mongo::MongoMMF::~MongoMMF (  )  [virtual]

Member Function Documentation

static void* mongo::MongoMMF::_switchToWritableView ( void *  private_ptr  )  [static]
virtual void mongo::MongoMMF::close (  )  [virtual]

Reimplemented from mongo::MemoryMappedFile.

bool mongo::MongoMMF::create ( string  fname,
unsigned long long &  len,
bool  sequentialHint 
)
string mongo::MongoMMF::filename (  )  const [inline]

Reimplemented from mongo::MongoFile.

Definition at line 41 of file mongommf.h.

int mongo::MongoMMF::fileSuffixNo (  )  const [inline]

Definition at line 80 of file mongommf.h.

bool mongo::MongoMMF::finishOpening (  )  [private]
void mongo::MongoMMF::flush ( bool  sync  )  [inline, virtual]

Reimplemented from mongo::MemoryMappedFile.

Definition at line 43 of file mongommf.h.

void* mongo::MongoMMF::getView (  )  const [inline]

Definition at line 55 of file mongommf.h.

virtual bool mongo::MongoMMF::isMongoMMF (  )  [inline, virtual]

Reimplemented from mongo::MongoFile.

Definition at line 90 of file mongommf.h.

unsigned long long mongo::MongoMMF::length (  )  const [inline, virtual]
Returns:
file length

Reimplemented from mongo::MemoryMappedFile.

Definition at line 39 of file mongommf.h.

bool mongo::MongoMMF::open ( string  fname,
bool  sequentialHint 
)
Returns:
true if opened ok.
RelativePath mongo::MongoMMF::relativePath (  )  const [inline]

for a filename a/b/c.3 filePath() is "a/b/c" fileSuffixNo() is 3 if the suffix is "ns", fileSuffixNo -1

Definition at line 75 of file mongommf.h.

void mongo::MongoMMF::remapThePrivateView (  ) 
void mongo::MongoMMF::setPath ( string  pathAndFileName  )  [private]
void* mongo::MongoMMF::view_write (  )  const [inline]

Definition at line 60 of file mongommf.h.

bool& mongo::MongoMMF::willNeedRemap (  )  [inline]

true if we have written. set in PREPLOGBUFFER, it is NOT set immediately on write intent declaration. reset to false in REMAPPRIVATEVIEW

Definition at line 86 of file mongommf.h.


Member Data Documentation

Definition at line 98 of file mongommf.h.

Definition at line 97 of file mongommf.h.

Definition at line 95 of file mongommf.h.

Definition at line 94 of file mongommf.h.

Definition at line 96 of file mongommf.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