Storage Engine API
mongo::MobileIndex::BulkBuilderBase Class Referenceabstract
Inheritance diagram for mongo::MobileIndex::BulkBuilderBase:
mongo::SortedDataBuilderInterface mongo::MobileIndex::BulkBuilderStandard mongo::MobileIndex::BulkBuilderUnique

Public Member Functions

 BulkBuilderBase (MobileIndex *index, OperationContext *opCtx, bool dupsAllowed)
 
virtual ~BulkBuilderBase ()
 
Status addKey (const BSONObj &key, const RecordId &recId) override
 Adds 'key' to intermediate storage. More...
 
void commit (bool mayInterrupt) override
 Do any necessary work to finish building the tree. More...
 
- Public Member Functions inherited from mongo::SortedDataBuilderInterface
virtual ~SortedDataBuilderInterface ()
 

Protected Member Functions

Status _checkNextKey (const BSONObj &key)
 Checks whether the new key to be inserted is > or >= the previous one depending on _dupsAllowed. More...
 
virtual Status _addKey (const BSONObj &key, const RecordId &recId)=0
 

Protected Attributes

MobileIndex_index
 
OperationContext *const _opCtx
 
BSONObj _lastKey
 
const bool _dupsAllowed
 

Constructor & Destructor Documentation

◆ BulkBuilderBase()

mongo::MobileIndex::BulkBuilderBase::BulkBuilderBase ( MobileIndex index,
OperationContext *  opCtx,
bool  dupsAllowed 
)
inline

◆ ~BulkBuilderBase()

virtual mongo::MobileIndex::BulkBuilderBase::~BulkBuilderBase ( )
inlinevirtual

Member Function Documentation

◆ _addKey()

virtual Status mongo::MobileIndex::BulkBuilderBase::_addKey ( const BSONObj &  key,
const RecordId &  recId 
)
protectedpure virtual

◆ _checkNextKey()

Status mongo::MobileIndex::BulkBuilderBase::_checkNextKey ( const BSONObj &  key)
inlineprotected

Checks whether the new key to be inserted is > or >= the previous one depending on _dupsAllowed.

◆ addKey()

Status mongo::MobileIndex::BulkBuilderBase::addKey ( const BSONObj &  key,
const RecordId &  loc 
)
inlineoverridevirtual

Adds 'key' to intermediate storage.

'key' must be > or >= the last key passed to this function (depends on _dupsAllowed). If this is violated an error Status (ErrorCodes::InternalError) will be returned.

Implements mongo::SortedDataBuilderInterface.

◆ commit()

void mongo::MobileIndex::BulkBuilderBase::commit ( bool  mayInterrupt)
inlineoverridevirtual

Do any necessary work to finish building the tree.

The default implementation may be used if no commit phase is necessary because addKey always leaves the tree in a valid state.

This is called outside of any WriteUnitOfWork to allow implementations to split this up into multiple units.

Reimplemented from mongo::SortedDataBuilderInterface.

Member Data Documentation

◆ _dupsAllowed

const bool mongo::MobileIndex::BulkBuilderBase::_dupsAllowed
protected

◆ _index

MobileIndex* mongo::MobileIndex::BulkBuilderBase::_index
protected

◆ _lastKey

BSONObj mongo::MobileIndex::BulkBuilderBase::_lastKey
protected

◆ _opCtx

OperationContext* const mongo::MobileIndex::BulkBuilderBase::_opCtx
protected

The documentation for this class was generated from the following file: