DurableMappedFile adds some layers atop memory mapped files - specifically our handling of private views & such.
More...
#include <durable_mapped_file.h>
DurableMappedFile 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.
|
| void | setPath (const std::string &pathAndFileName) |
| |
| bool | finishOpening () |
| |
| | MemoryMappedFile (OperationContext *opCtx, OptionSet options=NONE) |
| |
| virtual | ~MemoryMappedFile () |
| |
| void * | map (OperationContext *opCtx, const char *filename) |
| | uasserts if file doesn't exist. More...
|
| |
| void * | create (OperationContext *opCtx, const std::string &filename, unsigned long long len, bool zero) |
| | uasserts if file exists. More...
|
| |
| void | flush (bool sync) |
| |
| virtual bool | isClosed () |
| | Returns true iff the file is closed. More...
|
| |
| virtual Flushable * | prepareFlush () |
| | returns a thread safe object that you can call flush on Flushable has to fail nicely if the underlying object gets killed More...
|
| |
| long | shortLength () const |
| |
| unsigned long long | length () const |
| |
| HANDLE | getFd () const |
| |
| void * | createPrivateMap () |
| | Creates a new view with the specified properties. More...
|
| |
| virtual uint64_t | getUniqueId () const |
| |
| void * | map (OperationContext *opCtx, const char *filename, unsigned long long &length) |
| | Creates with length if DNE, otherwise validates input length. More...
|
| |
| void * | remapPrivateView (OperationContext *opCtx, void *oldPrivateAddr) |
| | Close the current private view and open a new replacement. More...
|
| |
| | MongoFile (OptionSet options) |
| |
| virtual | ~MongoFile ()=default |
| |
| std::string | filename () const |
| |
| void | setFilename (OperationContext *opCtx, const std::string &fn) |
| |
| void | created (OperationContext *opCtx) |
| |
| void | destroyed (OperationContext *opCtx) |
| | Implementations may assume this is called from within LockMongoFilesExclusive. More...
|
| |
| bool | isOptionSet (Options option) const |
| |
◆ DurableMappedFile()
| mongo::DurableMappedFile::DurableMappedFile |
( |
OperationContext * |
opCtx, |
|
|
OptionSet |
options = NONE |
|
) |
| |
|
explicit |
◆ ~DurableMappedFile()
| mongo::DurableMappedFile::~DurableMappedFile |
( |
| ) |
|
|
virtual |
◆ close()
| void mongo::DurableMappedFile::close |
( |
OperationContext * |
opCtx | ) |
|
|
virtual |
◆ create()
| bool mongo::DurableMappedFile::create |
( |
OperationContext * |
opCtx, |
|
|
const std::string & |
fname, |
|
|
unsigned long long & |
len |
|
) |
| |
◆ filename()
| std::string mongo::DurableMappedFile::filename |
( |
| ) |
const |
|
inline |
◆ fileSuffixNo()
| int mongo::DurableMappedFile::fileSuffixNo |
( |
| ) |
const |
|
inline |
◆ finishOpening()
| bool mongo::DurableMappedFile::finishOpening |
( |
| ) |
|
|
private |
◆ flush()
| void mongo::DurableMappedFile::flush |
( |
bool |
sync | ) |
|
|
inlinevirtual |
◆ getFd()
| HANDLE mongo::DurableMappedFile::getFd |
( |
| ) |
|
|
inline |
◆ getView()
| void* mongo::DurableMappedFile::getView |
( |
| ) |
const |
|
inline |
◆ isDurableMappedFile()
| virtual bool mongo::DurableMappedFile::isDurableMappedFile |
( |
| ) |
|
|
inlinevirtual |
◆ length()
| unsigned long long mongo::DurableMappedFile::length |
( |
| ) |
const |
|
inlinevirtual |
◆ open()
| bool mongo::DurableMappedFile::open |
( |
OperationContext * |
opCtx, |
|
|
const std::string & |
fname |
|
) |
| |
- Returns
- true if opened ok.
◆ relativePath()
| const RelativePath& mongo::DurableMappedFile::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
◆ remapThePrivateView()
| void mongo::DurableMappedFile::remapThePrivateView |
( |
OperationContext * |
opCtx | ) |
|
◆ setPath()
| void mongo::DurableMappedFile::setPath |
( |
const std::string & |
pathAndFileName | ) |
|
|
private |
◆ setWillNeedRemap()
| void mongo::DurableMappedFile::setWillNeedRemap |
( |
| ) |
|
|
inline |
◆ view_write()
| void* mongo::DurableMappedFile::view_write |
( |
| ) |
const |
|
inline |
◆ viewForFlushing()
| virtual void* mongo::DurableMappedFile::viewForFlushing |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ willNeedRemap()
| bool mongo::DurableMappedFile::willNeedRemap |
( |
| ) |
|
|
inline |
true if we have written.
set in PREPLOGBUFFER, it is NOT set immediately on write intent declaration. reset to false in REMAPPRIVATEVIEW
◆ _fileSuffixNo
| int mongo::DurableMappedFile::_fileSuffixNo |
|
private |
◆ _p
◆ _view_private
| void* mongo::DurableMappedFile::_view_private |
|
private |
◆ _view_write
| void* mongo::DurableMappedFile::_view_write |
|
private |
◆ _willNeedRemap
| bool mongo::DurableMappedFile::_willNeedRemap |
|
private |
The documentation for this class was generated from the following files: