![]() |
Storage Engine API
|
Simple wrapper around an array object to allow append-only modification of the array, as well as concurrent read-accesses. More...
Simple wrapper around an array object to allow append-only modification of the array, as well as concurrent read-accesses.
This class has a minimal interface to keep implementation simple and easy to modify.
Public Member Functions | |
| FilesArray () | |
| ~FilesArray () | |
| void | close (OperationContext *opCtx) |
| Must be called before destruction. More... | |
| DataFile * | operator[] (int n) const |
| Returns file at location 'n' in the array, with 'n' less than number of files added. More... | |
| bool | empty () const |
| Returns true iff no files were added. More... | |
| int | size () const |
| Returns number of files added to the array. More... | |
| void | push_back (DataFile *val) |
Private Attributes | |
| stdx::mutex | _writersMutex |
| AtomicInt32 | _size |
| DataFile * | _files [DiskLoc::MaxFiles] |
|
inline |
| mongo::MmapV1ExtentManager::FilesArray::~FilesArray | ( | ) |
| void mongo::MmapV1ExtentManager::FilesArray::close | ( | OperationContext * | opCtx | ) |
Must be called before destruction.
|
inline |
Returns true iff no files were added.
|
inline |
Returns file at location 'n' in the array, with 'n' less than number of files added.
Will always return the same pointer for a given file.
|
inline |
Returns number of files added to the array.
|
private |
|
private |
|
private |