![]() |
Storage Engine API
|
This class comprises a mock Collection for use by UUIDCatalog unit tests. More...
#include <collection_mock.h>
This class comprises a mock Collection for use by UUIDCatalog unit tests.
Public Member Functions | |
CollectionMock (const NamespaceString &ns) | |
~CollectionMock ()=default | |
void | init (OperationContext *opCtx) |
const NamespaceString & | ns () const |
bool | ok () const |
CollectionCatalogEntry * | getCatalogEntry () |
const CollectionCatalogEntry * | getCatalogEntry () const |
CollectionInfoCache * | infoCache () |
const CollectionInfoCache * | infoCache () const |
void | refreshUUID (OperationContext *opCtx) |
const IndexCatalog * | getIndexCatalog () const |
IndexCatalog * | getIndexCatalog () |
const RecordStore * | getRecordStore () const |
RecordStore * | getRecordStore () |
CursorManager * | getCursorManager () const |
bool | requiresIdIndex () const |
Snapshotted< BSONObj > | docFor (OperationContext *opCtx, const RecordId &loc) const |
bool | findDoc (OperationContext *opCtx, const RecordId &loc, Snapshotted< BSONObj > *out) const |
std::unique_ptr< SeekableRecordCursor > | getCursor (OperationContext *opCtx, bool forward) const |
std::vector< std::unique_ptr< RecordCursor > > | getManyCursors (OperationContext *opCtx) const |
void | deleteDocument (OperationContext *opCtx, StmtId stmtId, const RecordId &loc, OpDebug *opDebug, bool fromMigrate, bool noWarn, Collection::StoreDeletedDoc storeDeletedDoc) |
Status | insertDocuments (OperationContext *opCtx, std::vector< InsertStatement >::const_iterator begin, std::vector< InsertStatement >::const_iterator end, OpDebug *opDebug, bool enforceQuota, bool fromMigrate) |
Status | insertDocument (OperationContext *opCtx, const InsertStatement &doc, OpDebug *opDebug, bool enforceQuota, bool fromMigrate) |
Status | insertDocumentsForOplog (OperationContext *opCtx, const DocWriter *const *docs, Timestamp *timestamps, size_t nDocs) |
Status | insertDocument (OperationContext *opCtx, const BSONObj &doc, const std::vector< MultiIndexBlock *> &indexBlocks, bool enforceQuota) |
RecordId | updateDocument (OperationContext *opCtx, const RecordId &oldLocation, const Snapshotted< BSONObj > &oldDoc, const BSONObj &newDoc, bool enforceQuota, bool indexesAffected, OpDebug *opDebug, OplogUpdateEntryArgs *args) |
bool | updateWithDamagesSupported () const |
StatusWith< RecordData > | updateDocumentWithDamages (OperationContext *opCtx, const RecordId &loc, const Snapshotted< RecordData > &oldRec, const char *damageSource, const mutablebson::DamageVector &damages, OplogUpdateEntryArgs *args) |
StatusWith< CompactStats > | compact (OperationContext *opCtx, const CompactOptions *options) |
Status | truncate (OperationContext *opCtx) |
Status | validate (OperationContext *opCtx, ValidateCmdLevel level, bool background, std::unique_ptr< Lock::CollectionLock > collLk, ValidateResults *results, BSONObjBuilder *output) |
Status | touch (OperationContext *opCtx, bool touchData, bool touchIndexes, BSONObjBuilder *output) const |
void | cappedTruncateAfter (OperationContext *opCtx, RecordId end, bool inclusive) |
StatusWithMatchExpression | parseValidator (OperationContext *opCtx, const BSONObj &validator, MatchExpressionParser::AllowedFeatureSet allowedFeatures, boost::optional< ServerGlobalParams::FeatureCompatibility::Version > maxFeatureCompatibilityVersion) const |
Status | setValidator (OperationContext *opCtx, BSONObj validator) |
Status | setValidationLevel (OperationContext *opCtx, StringData newLevel) |
Status | setValidationAction (OperationContext *opCtx, StringData newAction) |
StringData | getValidationLevel () const |
StringData | getValidationAction () const |
Status | updateValidator (OperationContext *opCtx, BSONObj newValidator, StringData newLevel, StringData newAction) |
bool | isCapped () const |
std::shared_ptr< CappedInsertNotifier > | getCappedInsertNotifier () const |
uint64_t | numRecords (OperationContext *opCtx) const |
uint64_t | dataSize (OperationContext *opCtx) const |
uint64_t | getIndexSize (OperationContext *opCtx, BSONObjBuilder *details, int scale) |
boost::optional< Timestamp > | getMinimumVisibleSnapshot () |
void | setMinimumVisibleSnapshot (Timestamp name) |
bool | haveCappedWaiters () |
Returns true if there may be waiters. More... | |
void | notifyCappedWaitersIfNeeded () |
Used to notify any waiters when new documents may be visible in the capped collection. More... | |
const CollatorInterface * | getDefaultCollator () const |
OptionalCollectionUUID | uuid () const |
![]() | |
virtual | ~Impl ()=0 |
Private Member Functions | |
DatabaseCatalogEntry * | dbce () const |
CollectionCatalogEntry * | details () const |
Status | aboutToDeleteCapped (OperationContext *opCtx, const RecordId &loc, RecordData data) |
This will be called right before loc is deleted when wrapping. More... | |
Status | recordStoreGoingToUpdateInPlace (OperationContext *opCtx, const RecordId &loc) |
![]() | |
virtual | ~CappedCallback () |
![]() | |
virtual | ~UpdateNotifier () |
Private Attributes | |
const NamespaceString | _ns |
|
inline |
|
default |
|
inlineprivatevirtual |
This will be called right before loc is deleted when wrapping.
If data is unowned, it is only valid inside of this call. If implementations wish to stash a pointer, they must copy it.
Implements mongo::CappedCallback.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlineprivatevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlineprivatevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Returns true if there may be waiters.
Implements mongo::CappedCallback.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Used to notify any waiters when new documents may be visible in the capped collection.
Implements mongo::CappedCallback.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlineprivatevirtual |
Implements mongo::UpdateNotifier.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
inlinevirtual |
Implements mongo::Collection::Impl.
|
private |