mongo::NamespaceDetails Class Reference

#include <namespace.h>

List of all members.

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)
IndexDetailsaddIndex (const char *thisns, bool resetTransient=true)
DiskLoc alloc (const char *ns, int lenToAlloc, DiskLoc &extentLoc)
ExtraallocExtra (const char *ns, int nindexessofar)
int averageObjectSize ()
bool capLooped () const
void cappedCheckMigrate ()
void cappedDumpDelInfo ()
DiskLoccappedLastDelRecLastExtent ()
DiskLoccappedListOfAllDeletedRecords ()
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)
Extraextra ()
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
IndexDetailsidx (int idxNo, bool missingExpected=false)
int idxNo (IndexDetails &idx)
IndexIterator ii ()
bool inCapExtent (const DiskLoc &dl) const
IndexDetailsinProgIdx ()
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
NamespaceDetailswritingWithExtra ()
NamespaceDetailswritingWithoutExtra ()

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)
DiskLoccappedFirstDeletedInCurExtent ()
void cappedTruncateLastDelUpdate ()
void compact ()
void maybeComplain (const char *ns, int len) const
bool nextIsInCapExtent (const DiskLoc &dl) const
ExtenttheCapExtent () const

Private Attributes

IndexDetails _indexes [NIndexesBase]
long long extraOffset
unsigned long long reservedA

Friends

class NamespaceIndex

Detailed Description

Definition at line 114 of file namespace.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
NIndexesMax 
NIndexesExtra 
NIndexesBase 

Definition at line 116 of file namespace.h.

Enumerator:
Flag_HaveIdIndex 

Definition at line 244 of file namespace.h.


Constructor & Destructor Documentation

mongo::NamespaceDetails::NamespaceDetails ( const DiskLoc loc,
bool  _capped 
) [explicit]

Member Function Documentation

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]
DiskLoc mongo::NamespaceDetails::alloc ( const char *  ns,
int  lenToAlloc,
DiskLoc extentLoc 
)
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.

Parameters:
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.

DiskLoc mongo::NamespaceDetails::firstRecord ( const DiskLoc startExtent = DiskLoc()  )  const
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.

DiskLoc mongo::NamespaceDetails::lastRecord ( const DiskLoc startExtent = DiskLoc()  )  const
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.


Friends And Related Function Documentation

friend class NamespaceIndex [friend]

Definition at line 376 of file namespace.h.


Member Data Documentation

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.

Definition at line 149 of file namespace.h.

Definition at line 128 of file namespace.h.

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.

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.

Definition at line 151 of file namespace.h.

Definition at line 136 of file namespace.h.

Definition at line 144 of file namespace.h.

Definition at line 164 of file namespace.h.

unsigned long long mongo::NamespaceDetails::reservedA [private]

Definition at line 154 of file namespace.h.

Definition at line 158 of file namespace.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mongodb
Author(s): Nate Koenig
autogenerated on Fri Jan 11 12:15:56 2013