mongo::ModSetState Class Reference

#include <update.h>

List of all members.

Classes

struct  FieldCmp

Public Member Functions

void appendSizeSpecForArrayDepMods (BSONObjBuilder &b) const
void applyModsInPlace (bool isOnDisk)
bool canApplyInPlace () const
BSONObj createNewFromMods ()
BSONObj getOpLogRewrite () const
bool haveArrayDepMod () const
bool needOpLogRewrite () const
string toString () const

Private Types

typedef map< string, ModState,
FieldCmp
ModStateHolder

Private Member Functions

template<class Builder >
void _appendNewFromMods (const string &root, ModState &m, Builder &b, set< string > &onedownseen)
bool amIInPlacePossible (bool inPlacePossible)
template<class Builder >
void appendNewFromMod (ModState &ms, Builder &b)
template<class Builder >
void createNewFromMods (const string &root, Builder &b, const BSONObj &obj)
 ModSetState (const BSONObj &obj)

Private Attributes

bool _inPlacePossible
ModStateHolder _mods
BSONObj _newFromMods
const BSONObj_obj

Friends

class ModSet

Detailed Description

this is used to hold state, meta data while applying a ModSet to a BSONObj the goal is to make ModSet const so its re-usable

Definition at line 506 of file update.h.


Member Typedef Documentation

typedef map<string,ModState,FieldCmp> mongo::ModSetState::ModStateHolder [private]

Definition at line 512 of file update.h.


Constructor & Destructor Documentation

mongo::ModSetState::ModSetState ( const BSONObj obj  )  [inline, private]

Definition at line 518 of file update.h.


Member Function Documentation

template<class Builder >
void mongo::ModSetState::_appendNewFromMods ( const string &  root,
ModState m,
Builder &  b,
set< string > &  onedownseen 
) [inline, private]
bool mongo::ModSetState::amIInPlacePossible ( bool  inPlacePossible  )  [inline, private]
Returns:
if in place is still possible

Definition at line 525 of file update.h.

template<class Builder >
void mongo::ModSetState::appendNewFromMod ( ModState ms,
Builder &  b 
) [inline, private]

Definition at line 538 of file update.h.

void mongo::ModSetState::appendSizeSpecForArrayDepMods ( BSONObjBuilder b  )  const [inline]

Definition at line 628 of file update.h.

void mongo::ModSetState::applyModsInPlace ( bool  isOnDisk  ) 

modified underlying _obj

Parameters:
isOnDisk - true means this is an on disk object, and this update needs to be made durable
bool mongo::ModSetState::canApplyInPlace (  )  const [inline]

Definition at line 593 of file update.h.

BSONObj mongo::ModSetState::createNewFromMods (  ) 
template<class Builder >
void mongo::ModSetState::createNewFromMods ( const string &  root,
Builder &  b,
const BSONObj obj 
) [inline, private]
BSONObj mongo::ModSetState::getOpLogRewrite (  )  const [inline]

Definition at line 614 of file update.h.

bool mongo::ModSetState::haveArrayDepMod (  )  const [inline]

Definition at line 621 of file update.h.

bool mongo::ModSetState::needOpLogRewrite (  )  const [inline]

Definition at line 607 of file update.h.

string mongo::ModSetState::toString (  )  const

Friends And Related Function Documentation

friend class ModSet [friend]

Definition at line 642 of file update.h.


Member Data Documentation

Definition at line 515 of file update.h.

Definition at line 514 of file update.h.

Definition at line 516 of file update.h.

Definition at line 513 of file update.h.


The documentation for this class was generated from the following file:
 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