Storage Engine API
mongo::DevNullSortedDataInterface Class Reference
Inheritance diagram for mongo::DevNullSortedDataInterface:
mongo::SortedDataInterface

Public Member Functions

virtual ~DevNullSortedDataInterface ()
 
virtual SortedDataBuilderInterfacegetBulkBuilder (OperationContext *opCtx, bool dupsAllowed)
 Return a bulk builder for 'this' index. More...
 
virtual Status insert (OperationContext *opCtx, const BSONObj &key, const RecordId &loc, bool dupsAllowed)
 Insert an entry into the index with the specified key and RecordId. More...
 
virtual void unindex (OperationContext *opCtx, const BSONObj &key, const RecordId &loc, bool dupsAllowed)
 Remove the entry from the index with the specified key and RecordId. More...
 
virtual Status dupKeyCheck (OperationContext *opCtx, const BSONObj &key, const RecordId &loc)
 Return ErrorCodes::DuplicateKey if 'key' already exists in 'this' index at a RecordId other than 'loc', and Status::OK() otherwise. More...
 
virtual void fullValidate (OperationContext *opCtx, long long *numKeysOut, ValidateResults *fullResults) const
 TODO: expose full set of args for testing? More...
 
virtual bool appendCustomStats (OperationContext *opCtx, BSONObjBuilder *output, double scale) const
 
virtual long long getSpaceUsedBytes (OperationContext *opCtx) const
 Return the number of bytes consumed by 'this' index. More...
 
virtual bool isEmpty (OperationContext *opCtx)
 Return true if 'this' index is empty, and false otherwise. More...
 
virtual std::unique_ptr< SortedDataInterface::CursornewCursor (OperationContext *opCtx, bool isForward) const
 Returns an unpositioned cursor over 'this' index. More...
 
virtual Status initAsEmpty (OperationContext *opCtx)
 
- Public Member Functions inherited from mongo::SortedDataInterface
virtual ~SortedDataInterface ()
 
virtual Status compact (OperationContext *opCtx)
 Attempt to reduce the storage space used by this index via compaction. More...
 
virtual Status touch (OperationContext *opCtx) const
 Attempt to bring the entirety of 'this' index into memory. More...
 
virtual long long numEntries (OperationContext *opCtx) const
 Return the number of entries in 'this' index. More...
 
virtual std::unique_ptr< CursornewRandomCursor (OperationContext *opCtx) const
 Constructs a cursor over an index that returns entries in a randomized order, and allows storage engines to provide a more efficient way to randomly sample a collection than MongoDB's default sampling methods, which are used when this method returns {}. More...
 

Constructor & Destructor Documentation

◆ ~DevNullSortedDataInterface()

virtual mongo::DevNullSortedDataInterface::~DevNullSortedDataInterface ( )
inlinevirtual

Member Function Documentation

◆ appendCustomStats()

virtual bool mongo::DevNullSortedDataInterface::appendCustomStats ( OperationContext *  opCtx,
BSONObjBuilder *  output,
double  scale 
) const
inlinevirtual

◆ dupKeyCheck()

virtual Status mongo::DevNullSortedDataInterface::dupKeyCheck ( OperationContext *  opCtx,
const BSONObj &  key,
const RecordId &  loc 
)
inlinevirtual

Return ErrorCodes::DuplicateKey if 'key' already exists in 'this' index at a RecordId other than 'loc', and Status::OK() otherwise.

Parameters
opCtxthe transaction under which this operation takes place

TODO: Hide this by exposing an update method?

Implements mongo::SortedDataInterface.

◆ fullValidate()

virtual void mongo::DevNullSortedDataInterface::fullValidate ( OperationContext *  opCtx,
long long *  numKeysOut,
ValidateResults fullResults 
) const
inlinevirtual

TODO: expose full set of args for testing?

Implements mongo::SortedDataInterface.

◆ getBulkBuilder()

virtual SortedDataBuilderInterface* mongo::DevNullSortedDataInterface::getBulkBuilder ( OperationContext *  opCtx,
bool  dupsAllowed 
)
inlinevirtual

Return a bulk builder for 'this' index.

Implementations can assume that 'this' index outlives its bulk builder.

Parameters
opCtxthe transaction under which keys are added to 'this' index
dupsAllowedtrue if duplicate keys are allowed, and false otherwise
Returns
caller takes ownership

Implements mongo::SortedDataInterface.

◆ getSpaceUsedBytes()

virtual long long mongo::DevNullSortedDataInterface::getSpaceUsedBytes ( OperationContext *  opCtx) const
inlinevirtual

Return the number of bytes consumed by 'this' index.

Parameters
opCtxthe transaction under which this operation takes place
See also
IndexAccessMethod::getSpaceUsedBytes

Implements mongo::SortedDataInterface.

◆ initAsEmpty()

virtual Status mongo::DevNullSortedDataInterface::initAsEmpty ( OperationContext *  opCtx)
inlinevirtual

◆ insert()

virtual Status mongo::DevNullSortedDataInterface::insert ( OperationContext *  opCtx,
const BSONObj &  key,
const RecordId &  loc,
bool  dupsAllowed 
)
inlinevirtual

Insert an entry into the index with the specified key and RecordId.

Parameters
opCtxthe transaction under which the insert takes place
dupsAllowedtrue if duplicate keys are allowed, and false otherwise
Returns
Status::OK() if the insert succeeded,
    ErrorCodes::DuplicateKey if 'key' already exists in 'this' index
    at a RecordId other than 'loc' and duplicates were not allowed

Implements mongo::SortedDataInterface.

◆ isEmpty()

virtual bool mongo::DevNullSortedDataInterface::isEmpty ( OperationContext *  opCtx)
inlinevirtual

Return true if 'this' index is empty, and false otherwise.

Implements mongo::SortedDataInterface.

◆ newCursor()

virtual std::unique_ptr<SortedDataInterface::Cursor> mongo::DevNullSortedDataInterface::newCursor ( OperationContext *  opCtx,
bool  isForward 
) const
inlinevirtual

Returns an unpositioned cursor over 'this' index.

Implementations can assume that 'this' index outlives all cursors it produces.

Implements mongo::SortedDataInterface.

◆ unindex()

virtual void mongo::DevNullSortedDataInterface::unindex ( OperationContext *  opCtx,
const BSONObj &  key,
const RecordId &  loc,
bool  dupsAllowed 
)
inlinevirtual

Remove the entry from the index with the specified key and RecordId.

Parameters
opCtxthe transaction under which the remove takes place
dupsAllowedtrue if duplicate keys are allowed, and false otherwise

Implements mongo::SortedDataInterface.


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