Storage Engine API
mongo::WiredTigerIndex::StandardBulkBuilder Class Reference

Bulk builds a non-unique index. More...

Inheritance diagram for mongo::WiredTigerIndex::StandardBulkBuilder:
mongo::WiredTigerIndex::BulkBuilder mongo::SortedDataBuilderInterface

Detailed Description

Bulk builds a non-unique index.

Public Member Functions

 StandardBulkBuilder (WiredTigerIndex *idx, OperationContext *opCtx, KVPrefix prefix)
 
Status addKey (const BSONObj &key, const RecordId &id) 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::WiredTigerIndex::BulkBuilder
 BulkBuilder (WiredTigerIndex *idx, OperationContext *opCtx, KVPrefix prefix)
 
 ~BulkBuilder ()
 
- Public Member Functions inherited from mongo::SortedDataBuilderInterface
virtual ~SortedDataBuilderInterface ()
 

Private Attributes

WiredTigerIndex_idx
 

Additional Inherited Members

- Protected Member Functions inherited from mongo::WiredTigerIndex::BulkBuilder
WT_CURSOR * openBulkCursor (WiredTigerIndex *idx)
 
void setKey (WT_CURSOR *cursor, const WT_ITEM *item)
 
- Protected Attributes inherited from mongo::WiredTigerIndex::BulkBuilder
const Ordering _ordering
 
OperationContext *const _opCtx
 
UniqueWiredTigerSession const _session
 
WT_CURSOR *const _cursor
 
KVPrefix _prefix
 

Constructor & Destructor Documentation

◆ StandardBulkBuilder()

mongo::WiredTigerIndex::StandardBulkBuilder::StandardBulkBuilder ( WiredTigerIndex idx,
OperationContext *  opCtx,
KVPrefix  prefix 
)
inline

Member Function Documentation

◆ addKey()

Status mongo::WiredTigerIndex::StandardBulkBuilder::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::WiredTigerIndex::StandardBulkBuilder::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

◆ _idx

WiredTigerIndex* mongo::WiredTigerIndex::StandardBulkBuilder::_idx
private

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