![]() |
Storage Engine API
|
#include <record_store_v1_test_help.h>
Classes | |
struct | ExtentInfo |
Public Member Functions | |
virtual | ~DummyExtentManager () |
virtual void | close (OperationContext *opCtx) |
virtual Status | init (OperationContext *opCtx) |
opens all current files More... | |
virtual int | numFiles () const |
virtual long long | fileSize () const |
virtual DiskLoc | allocateExtent (OperationContext *opCtx, bool capped, int size, bool enforceQuota) |
virtual void | freeExtents (OperationContext *opCtx, DiskLoc firstExt, DiskLoc lastExt) |
firstExt has to be == lastExt or a chain More... | |
virtual void | freeExtent (OperationContext *opCtx, DiskLoc extent) |
frees a single extent ignores all fields in the Extent except: magic, myLoc, length More... | |
virtual void | freeListStats (OperationContext *opCtx, int *numExtents, int64_t *totalFreeSizeBytes) const |
Retrieve statistics on the the free list managed by this ExtentManger. More... | |
virtual MmapV1RecordHeader * | recordForV1 (const DiskLoc &loc) const |
virtual std::unique_ptr< RecordFetcher > | recordNeedsFetch (const DiskLoc &loc) const final |
The extent manager tracks accesses to DiskLocs. More... | |
virtual Extent * | extentForV1 (const DiskLoc &loc) const |
virtual DiskLoc | extentLocForV1 (const DiskLoc &loc) const |
virtual Extent * | getExtent (const DiskLoc &loc, bool doSanityCheck=true) const |
virtual int | maxSize () const |
virtual CacheHint * | cacheHint (const DiskLoc &extentLoc, const HintType &hint) |
Tell the system that for this extent, it will have this kind of disk access. More... | |
DataFileVersion | getFileFormat (OperationContext *opCtx) const final |
virtual void | setFileFormat (OperationContext *opCtx, DataFileVersion newVersion) final |
const DataFile * | getOpenFile (int n) const final |
![]() | |
ExtentManager () | |
virtual | ~ExtentManager () |
virtual int | minSize () const |
virtual int | followupSize (int recordLen, int lastExtentLen) const |
virtual int | initialSize (int recordLen) const |
get a suggested size for the first extent in a namespace More... | |
virtual int | quantizeExtentSize (int size) const |
quantizes extent size to >= min + page boundary More... | |
Protected Attributes | |
std::vector< ExtentInfo > | _extents |
Additional Inherited Members | |
![]() | |
enum | HintType { Sequential, Random } |
|
virtual |
|
virtual |
Implements mongo::ExtentManager.
|
virtual |
Tell the system that for this extent, it will have this kind of disk access.
Caller takes owernship of CacheHint
Implements mongo::ExtentManager.
|
virtual |
Implements mongo::ExtentManager.
loc | - has to be for a specific MmapV1RecordHeader (not an Extent) Note(erh) see comment on recordFor |
Implements mongo::ExtentManager.
loc | - has to be for a specific MmapV1RecordHeader (not an Extent) Note(erh) see comment on recordFor |
Implements mongo::ExtentManager.
|
virtual |
Implements mongo::ExtentManager.
frees a single extent ignores all fields in the Extent except: magic, myLoc, length
Implements mongo::ExtentManager.
|
virtual |
firstExt has to be == lastExt or a chain
Implements mongo::ExtentManager.
|
virtual |
Retrieve statistics on the the free list managed by this ExtentManger.
numExtents | - non-null pointer to an int that will receive the number of extents |
totalFreeSizeBytes | - non-null pointer to an int64_t receiving the total free space in the free list. |
Implements mongo::ExtentManager.
|
virtual |
loc | - has to be for a specific Extent |
Implements mongo::ExtentManager.
|
finalvirtual |
Implements mongo::ExtentManager.
|
finalvirtual |
Implements mongo::ExtentManager.
|
virtual |
opens all current files
Implements mongo::ExtentManager.
|
virtual |
Implements mongo::ExtentManager.
|
virtual |
Implements mongo::ExtentManager.
|
virtual |
loc | - has to be for a specific MmapV1RecordHeader Note(erh): this sadly cannot be removed. A MmapV1RecordHeader DiskLoc has an offset from a file, while a RecordStore really wants an offset from an extent. This intrinsically links an original record store to the original extent manager. |
Implements mongo::ExtentManager.
|
finalvirtual |
The extent manager tracks accesses to DiskLocs.
This returns non-NULL if the DiskLoc has been recently accessed, and therefore has likely been paged into physical memory. Returns nullptr if the DiskLoc is Null.
Implements mongo::ExtentManager.
|
finalvirtual |
Implements mongo::ExtentManager.
|
protected |