#include <mmap.h>
◆ OptionSet
◆ Options
Enumerator |
---|
NONE | |
SEQUENTIAL | |
READONLY | |
◆ MongoFile()
mongo::MongoFile::MongoFile |
( |
OptionSet |
options | ) |
|
◆ ~MongoFile()
virtual mongo::MongoFile::~MongoFile |
( |
| ) |
|
|
virtualdefault |
◆ _flushAll()
int mongo::MongoFile::_flushAll |
( |
OperationContext * |
opCtx, |
|
|
bool |
sync |
|
) |
| |
|
staticprivate |
◆ close()
virtual void mongo::MongoFile::close |
( |
OperationContext * |
opCtx | ) |
|
|
protectedpure virtual |
◆ closeAllFiles()
void mongo::MongoFile::closeAllFiles |
( |
OperationContext * |
opCtx, |
|
|
std::stringstream & |
message |
|
) |
| |
|
static |
◆ created()
void mongo::MongoFile::created |
( |
OperationContext * |
opCtx | ) |
|
|
protected |
◆ destroyed()
void mongo::MongoFile::destroyed |
( |
OperationContext * |
opCtx | ) |
|
|
protected |
Implementations may assume this is called from within LockMongoFilesExclusive
.
subclass must call in destructor (or at close). removes this from pathToFile and other maps safe to call more than once, albeit might be wasted work ideal to call close to the close, if the close is well before object destruction
◆ filename()
std::string mongo::MongoFile::filename |
( |
| ) |
const |
|
inline |
◆ flush()
virtual void mongo::MongoFile::flush |
( |
bool |
sync | ) |
|
|
protectedpure virtual |
◆ flushAll()
int mongo::MongoFile::flushAll |
( |
OperationContext * |
opCtx, |
|
|
bool |
sync |
|
) |
| |
|
static |
◆ forEach()
template<class F >
void mongo::MongoFile::forEach |
( |
OperationContext * |
opCtx, |
|
|
F |
p |
|
) |
| |
|
inlinestatic |
p is called from within a mutex that MongoFile uses.
- Parameters
-
fun | is called for each MongoFile. called from within a mutex that MongoFile uses. so be careful not to deadlock. |
so be careful not to deadlock.
◆ getAllFiles()
set< MongoFile * > & mongo::MongoFile::getAllFiles |
( |
| ) |
|
|
static |
note: you need to be in mmmutex when using this.
forEach (above) handles that for you automatically.
◆ getUniqueId()
virtual uint64_t mongo::MongoFile::getUniqueId |
( |
| ) |
const |
|
pure virtual |
◆ isClosed()
virtual bool mongo::MongoFile::isClosed |
( |
| ) |
|
|
protectedpure virtual |
◆ isDurableMappedFile()
virtual bool mongo::MongoFile::isDurableMappedFile |
( |
| ) |
|
|
inlinevirtual |
◆ isOptionSet()
bool mongo::MongoFile::isOptionSet |
( |
Options |
option | ) |
const |
|
inlineprotected |
◆ length()
virtual unsigned long long mongo::MongoFile::length |
( |
| ) |
const |
|
protectedpure virtual |
◆ MONGO_DISALLOW_COPYING()
mongo::MongoFile::MONGO_DISALLOW_COPYING |
( |
MongoFile |
| ) |
|
|
private |
◆ prepareFlush()
virtual Flushable* mongo::MongoFile::prepareFlush |
( |
| ) |
|
|
protectedpure virtual |
returns a thread safe object that you can call flush on Flushable has to fail nicely if the underlying object gets killed
Implemented in mongo::MemoryMappedFile.
◆ setFilename()
void mongo::MongoFile::setFilename |
( |
OperationContext * |
opCtx, |
|
|
const std::string & |
fn |
|
) |
| |
◆ _filename
std::string mongo::MongoFile::_filename |
|
private |
◆ _options
The documentation for this class was generated from the following files:
- /home/louis/git/mongodbsource.github.io/src/src/mongo/db/storage/mmap_v1/mmap.h
- /home/louis/git/mongodbsource.github.io/src/src/mongo/db/storage/mmap_v1/mmap.cpp