Storage Engine API
mongo::SortedDataBuilderInterface Class Referenceabstract

A version-hiding wrapper around the bulk builder for the Btree. More...

#include <sorted_data_interface.h>

Inheritance diagram for mongo::SortedDataBuilderInterface:
mongo::DevNullSortedDataBuilderInterface mongo::MobileIndex::BulkBuilderBase mongo::WiredTigerIndex::BulkBuilder mongo::MobileIndex::BulkBuilderStandard mongo::MobileIndex::BulkBuilderUnique mongo::WiredTigerIndex::StandardBulkBuilder mongo::WiredTigerIndex::UniqueBulkBuilder

Detailed Description

A version-hiding wrapper around the bulk builder for the Btree.

Public Member Functions

virtual ~SortedDataBuilderInterface ()
 
virtual Status addKey (const BSONObj &key, const RecordId &loc)=0
 Adds 'key' to intermediate storage. More...
 
virtual void commit (bool mayInterrupt)
 Do any necessary work to finish building the tree. More...
 

Constructor & Destructor Documentation

◆ ~SortedDataBuilderInterface()

virtual mongo::SortedDataBuilderInterface::~SortedDataBuilderInterface ( )
inlinevirtual

Member Function Documentation

◆ addKey()

virtual Status mongo::SortedDataBuilderInterface::addKey ( const BSONObj &  key,
const RecordId &  loc 
)
pure virtual

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.

Implemented in mongo::WiredTigerIndex::UniqueBulkBuilder, mongo::WiredTigerIndex::StandardBulkBuilder, mongo::MobileIndex::BulkBuilderBase, and mongo::DevNullSortedDataBuilderInterface.

◆ commit()

virtual void mongo::SortedDataBuilderInterface::commit ( bool  mayInterrupt)
inlinevirtual

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 in mongo::WiredTigerIndex::UniqueBulkBuilder, mongo::WiredTigerIndex::StandardBulkBuilder, and mongo::MobileIndex::BulkBuilderBase.


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