#include <namespace.h>
Classes | |
struct | Capped2 |
class | Extra |
struct | ExtraOld |
class | IndexIterator |
struct | Stats |
Public Types | |
enum | { NIndexesMax = 64, NIndexesExtra = 30, NIndexesBase = 10 } |
enum | NamespaceFlags { Flag_HaveIdIndex = 1 << 0 } |
Public Member Functions | |
void | aboutToDeleteAnIndex () |
void | addDeletedRec (DeletedRecord *d, DiskLoc dloc) |
IndexDetails & | addIndex (const char *thisns, bool resetTransient=true) |
DiskLoc | alloc (const char *ns, int lenToAlloc, DiskLoc &extentLoc) |
Extra * | allocExtra (const char *ns, int nindexessofar) |
int | averageObjectSize () |
bool | capLooped () const |
void | cappedCheckMigrate () |
void | cappedDumpDelInfo () |
DiskLoc & | cappedLastDelRecLastExtent () |
DiskLoc & | cappedListOfAllDeletedRecords () |
void | cappedTruncateAfter (const char *ns, DiskLoc end, bool inclusive) |
void | clearIndexIsMultikey (int i) |
void | copyingFrom (const char *thisns, NamespaceDetails *src) |
void | dump (const Namespace &k) |
void | dumpDeleted (set< DiskLoc > *extents=0) |
void | dumpExtents () |
void | emptyCappedCollection (const char *ns) |
Extra * | extra () |
int | fieldIsIndexed (const char *fieldName) |
int | findIdIndex () |
int | findIndexByKeyPattern (const BSONObj &keyPattern) |
int | findIndexByName (const char *name) |
void | findIndexByType (const string &name, vector< int > &matches) |
DiskLoc | firstRecord (const DiskLoc &startExtent=DiskLoc()) const |
IndexDetails & | idx (int idxNo, bool missingExpected=false) |
int | idxNo (IndexDetails &idx) |
IndexIterator | ii () |
bool | inCapExtent (const DiskLoc &dl) const |
IndexDetails & | inProgIdx () |
bool | isMultikey (int i) const |
DiskLoc | lastRecord (const DiskLoc &startExtent=DiskLoc()) const |
NamespaceDetails (const DiskLoc &loc, bool _capped) | |
int | nIndexesBeingBuilt () const |
void | onLoad (const Namespace &k) |
void | paddingFits () |
void | paddingTooSmall () |
void | setIndexIsMultikey (int i) |
long long | storageSize (int *numExtents=0, BSONArrayBuilder *extentInfo=0) const |
NamespaceDetails * | writingWithExtra () |
NamespaceDetails * | writingWithoutExtra () |
Static Public Member Functions | |
static int | bucket (int n) |
Public Attributes | |
DiskLoc | capExtent |
DiskLoc | capFirstNewRecord |
int | capped |
struct mongo::NamespaceDetails::Capped2 | capped2 |
unsigned short | dataFileVersion |
DiskLoc | deletedList [Buckets] |
DiskLoc | firstExtent |
int | flags |
int | indexBuildInProgress |
unsigned short | indexFileVersion |
DiskLoc | lastExtent |
int | lastExtentSize |
int | max |
unsigned long long | multiKeyIndexBits |
int | nIndexes |
double | paddingFactor |
char | reserved [60] |
unsigned | reservedB |
struct mongo::NamespaceDetails::Stats | stats |
Private Member Functions | |
DiskLoc | __capAlloc (int len) |
DiskLoc | __stdAlloc (int len) |
DiskLoc | _alloc (const char *ns, int len) |
void | advanceCapExtent (const char *ns) |
BOOST_STATIC_ASSERT (sizeof(NamespaceDetails::Extra)==496) | |
BOOST_STATIC_ASSERT (sizeof(NamespaceDetails::ExtraOld)==496) | |
BOOST_STATIC_ASSERT (NIndexesMax<=64) | |
BOOST_STATIC_ASSERT (NIndexesMax<=NIndexesBase+NIndexesExtra *2) | |
DiskLoc | cappedAlloc (const char *ns, int len) |
DiskLoc & | cappedFirstDeletedInCurExtent () |
void | cappedTruncateLastDelUpdate () |
void | compact () |
void | maybeComplain (const char *ns, int len) const |
bool | nextIsInCapExtent (const DiskLoc &dl) const |
Extent * | theCapExtent () const |
Private Attributes | |
IndexDetails | _indexes [NIndexesBase] |
long long | extraOffset |
unsigned long long | reservedA |
Friends | |
class | NamespaceIndex |
Definition at line 114 of file namespace.h.
anonymous enum |
Definition at line 116 of file namespace.h.
Definition at line 244 of file namespace.h.
mongo::NamespaceDetails::NamespaceDetails | ( | const DiskLoc & | loc, | |
bool | _capped | |||
) | [explicit] |
DiskLoc mongo::NamespaceDetails::__capAlloc | ( | int | len | ) | [private] |
DiskLoc mongo::NamespaceDetails::__stdAlloc | ( | int | len | ) | [private] |
DiskLoc mongo::NamespaceDetails::_alloc | ( | const char * | ns, | |
int | len | |||
) | [private] |
void mongo::NamespaceDetails::aboutToDeleteAnIndex | ( | ) | [inline] |
Definition at line 296 of file namespace.h.
void mongo::NamespaceDetails::addDeletedRec | ( | DeletedRecord * | d, | |
DiskLoc | dloc | |||
) |
IndexDetails& mongo::NamespaceDetails::addIndex | ( | const char * | thisns, | |
bool | resetTransient = true | |||
) |
void mongo::NamespaceDetails::advanceCapExtent | ( | const char * | ns | ) | [private] |
Extra* mongo::NamespaceDetails::allocExtra | ( | const char * | ns, | |
int | nindexessofar | |||
) |
int mongo::NamespaceDetails::averageObjectSize | ( | ) | [inline] |
Definition at line 359 of file namespace.h.
mongo::NamespaceDetails::BOOST_STATIC_ASSERT | ( | sizeof(NamespaceDetails::Extra) | = =496 |
) | [private] |
mongo::NamespaceDetails::BOOST_STATIC_ASSERT | ( | sizeof(NamespaceDetails::ExtraOld) | = =496 |
) | [private] |
mongo::NamespaceDetails::BOOST_STATIC_ASSERT | ( | NIndexesMax<= | 64 | ) | [private] |
mongo::NamespaceDetails::BOOST_STATIC_ASSERT | ( | NIndexesMax<=NIndexesBase+NIndexesExtra * | 2 | ) | [private] |
static int mongo::NamespaceDetails::bucket | ( | int | n | ) | [inline, static] |
Definition at line 341 of file namespace.h.
bool mongo::NamespaceDetails::capLooped | ( | ) | const [inline] |
Definition at line 223 of file namespace.h.
DiskLoc mongo::NamespaceDetails::cappedAlloc | ( | const char * | ns, | |
int | len | |||
) | [private] |
void mongo::NamespaceDetails::cappedCheckMigrate | ( | ) |
void mongo::NamespaceDetails::cappedDumpDelInfo | ( | ) |
DiskLoc& mongo::NamespaceDetails::cappedFirstDeletedInCurExtent | ( | ) | [private] |
DiskLoc& mongo::NamespaceDetails::cappedLastDelRecLastExtent | ( | ) | [inline] |
Definition at line 221 of file namespace.h.
DiskLoc& mongo::NamespaceDetails::cappedListOfAllDeletedRecords | ( | ) | [inline] |
Definition at line 220 of file namespace.h.
void mongo::NamespaceDetails::cappedTruncateAfter | ( | const char * | ns, | |
DiskLoc | end, | |||
bool | inclusive | |||
) |
Truncate documents newer than the document at 'end' from the capped collection. The collection cannot be completely emptied using this function. An assertion will be thrown if that is attempted.
inclusive | - Truncate 'end' as well iff true |
void mongo::NamespaceDetails::cappedTruncateLastDelUpdate | ( | ) | [private] |
Update cappedLastDelRecLastExtent() after capExtent changed in cappedTruncateAfter()
void mongo::NamespaceDetails::clearIndexIsMultikey | ( | int | i | ) | [inline] |
Definition at line 284 of file namespace.h.
void mongo::NamespaceDetails::compact | ( | ) | [private] |
void mongo::NamespaceDetails::copyingFrom | ( | const char * | thisns, | |
NamespaceDetails * | src | |||
) |
void mongo::NamespaceDetails::dump | ( | const Namespace & | k | ) |
void mongo::NamespaceDetails::dumpDeleted | ( | set< DiskLoc > * | extents = 0 |
) |
void mongo::NamespaceDetails::dumpExtents | ( | ) |
void mongo::NamespaceDetails::emptyCappedCollection | ( | const char * | ns | ) |
Remove all documents from the capped collection
Extra* mongo::NamespaceDetails::extra | ( | ) | [inline] |
Definition at line 194 of file namespace.h.
int mongo::NamespaceDetails::fieldIsIndexed | ( | const char * | fieldName | ) |
int mongo::NamespaceDetails::findIdIndex | ( | ) | [inline] |
Definition at line 331 of file namespace.h.
int mongo::NamespaceDetails::findIndexByKeyPattern | ( | const BSONObj & | keyPattern | ) | [inline] |
Definition at line 105 of file namespace-inl.h.
int mongo::NamespaceDetails::findIndexByName | ( | const char * | name | ) | [inline] |
Definition at line 115 of file namespace-inl.h.
void mongo::NamespaceDetails::findIndexByType | ( | const string & | name, | |
vector< int > & | matches | |||
) | [inline] |
Definition at line 320 of file namespace.h.
IndexDetails & mongo::NamespaceDetails::idx | ( | int | idxNo, | |
bool | missingExpected = false | |||
) | [inline] |
Definition at line 73 of file namespace-inl.h.
int mongo::NamespaceDetails::idxNo | ( | IndexDetails & | idx | ) | [inline] |
Definition at line 95 of file namespace-inl.h.
IndexIterator mongo::NamespaceDetails::ii | ( | ) | [inline] |
Definition at line 268 of file namespace.h.
bool mongo::NamespaceDetails::inCapExtent | ( | const DiskLoc & | dl | ) | const |
IndexDetails& mongo::NamespaceDetails::inProgIdx | ( | ) | [inline] |
get the IndexDetails for the index currently being built in the background. (there is at most one)
Definition at line 251 of file namespace.h.
bool mongo::NamespaceDetails::isMultikey | ( | int | i | ) | const [inline] |
Definition at line 277 of file namespace.h.
void mongo::NamespaceDetails::maybeComplain | ( | const char * | ns, | |
int | len | |||
) | const [private] |
bool mongo::NamespaceDetails::nextIsInCapExtent | ( | const DiskLoc & | dl | ) | const [private] |
int mongo::NamespaceDetails::nIndexesBeingBuilt | ( | ) | const [inline] |
Definition at line 239 of file namespace.h.
void mongo::NamespaceDetails::onLoad | ( | const Namespace & | k | ) |
void mongo::NamespaceDetails::paddingFits | ( | ) | [inline] |
Definition at line 303 of file namespace.h.
void mongo::NamespaceDetails::paddingTooSmall | ( | ) | [inline] |
Definition at line 308 of file namespace.h.
void mongo::NamespaceDetails::setIndexIsMultikey | ( | int | i | ) | [inline] |
Definition at line 278 of file namespace.h.
long long mongo::NamespaceDetails::storageSize | ( | int * | numExtents = 0 , |
|
BSONArrayBuilder * | extentInfo = 0 | |||
) | const |
Extent* mongo::NamespaceDetails::theCapExtent | ( | ) | const [inline, private] |
Definition at line 212 of file namespace.h.
NamespaceDetails* mongo::NamespaceDetails::writingWithExtra | ( | ) |
Make all linked Extra objects writeable as well
NamespaceDetails* mongo::NamespaceDetails::writingWithoutExtra | ( | ) | [inline] |
Definition at line 365 of file namespace.h.
friend class NamespaceIndex [friend] |
Definition at line 376 of file namespace.h.
IndexDetails mongo::NamespaceDetails::_indexes[NIndexesBase] [private] |
Definition at line 139 of file namespace.h.
Definition at line 147 of file namespace.h.
Definition at line 148 of file namespace.h.
Definition at line 142 of file namespace.h.
unsigned short mongo::NamespaceDetails::dataFileVersion |
Definition at line 149 of file namespace.h.
Definition at line 128 of file namespace.h.
long long mongo::NamespaceDetails::extraOffset [private] |
Definition at line 155 of file namespace.h.
Definition at line 119 of file namespace.h.
Definition at line 146 of file namespace.h.
Definition at line 157 of file namespace.h.
unsigned short mongo::NamespaceDetails::indexFileVersion |
Definition at line 150 of file namespace.h.
Definition at line 120 of file namespace.h.
Definition at line 135 of file namespace.h.
Definition at line 143 of file namespace.h.
unsigned long long mongo::NamespaceDetails::multiKeyIndexBits |
Definition at line 151 of file namespace.h.
Definition at line 136 of file namespace.h.
Definition at line 144 of file namespace.h.
char mongo::NamespaceDetails::reserved[60] |
Definition at line 164 of file namespace.h.
unsigned long long mongo::NamespaceDetails::reservedA [private] |
Definition at line 154 of file namespace.h.
unsigned mongo::NamespaceDetails::reservedB |
Definition at line 158 of file namespace.h.