MongoDB  2.7.0
Public Member Functions | Public Attributes | List of all members
mongo::LogFile Class Reference

Public Member Functions

 LogFile (const std::string &name, bool readwrite=false)
 create the file and open. More...
 
 ~LogFile ()
 closes
 
void synchronousAppend (const void *buf, size_t len)
 append to file. More...
 
void writeAt (unsigned long long offset, const void *_bug, size_t _len)
 write at specified offset. More...
 
void readAt (unsigned long long offset, void *_buf, size_t _len)
 
void truncate ()
 

Public Attributes

const string _name
 

Constructor & Destructor Documentation

mongo::LogFile::LogFile ( const std::string &  name,
bool  readwrite = false 
)

create the file and open.

must not already exist. throws UserAssertion on i/o error

Member Function Documentation

void mongo::LogFile::synchronousAppend ( const void *  buf,
size_t  len 
)

append to file.

does not return until sync'd. uses direct i/o when possible. throws UserAssertion on an i/o error note direct i/o may have alignment requirements

void mongo::LogFile::writeAt ( unsigned long long  offset,
const void *  _bug,
size_t  _len 
)

write at specified offset.

must be aligned. noreturn until physically written. thread safe


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