33 #include "mongo/base/owned_pointer_vector.h" 48 bool isSystemIndexes);
52 const char*
name() const final {
53 return "CappedRecordStoreV1";
66 std::unique_ptr<SeekableRecordCursor>
getCursor(OperationContext* opCtx,
67 bool forward)
const final;
69 std::vector<std::unique_ptr<RecordCursor>>
getManyCursors(OperationContext* opCtx)
const final;
89 int lengthWithHeaders,
90 bool enforceQuota)
final;
96 void _compact(OperationContext* opCtx);
Extent * theCapExtent() const
Definition: record_store_v1_capped.cpp:564
DiskLoc __capAlloc(OperationContext *opCtx, int len)
Definition: record_store_v1_capped.cpp:396
void setListOfAllDeletedRecords(OperationContext *opCtx, const DiskLoc &loc)
Definition: record_store_v1_capped.cpp:552
void cappedTruncateAfter(OperationContext *opCtx, RecordId end, bool inclusive) final
Truncate documents newer than the document at 'end' from the capped collection.
Definition: record_store_v1_capped.cpp:254
bool isCapped() const final
Definition: record_store_v1_capped.h:77
void addDeletedRec(OperationContext *opCtx, const DiskLoc &dloc) final
Definition: record_store_v1_capped.cpp:568
bool inCapExtent(const DiskLoc &dl) const
Definition: record_store_v1_capped.cpp:351
bool shouldPadInserts() const final
Definition: record_store_v1_capped.h:80
Copyright (C) 2014 MongoDB Inc.
Definition: bson_collection_catalog_entry.cpp:38
std::unique_ptr< SeekableRecordCursor > getCursor(OperationContext *opCtx, bool forward) const final
Returns a new cursor over this record store.
Definition: record_store_v1_capped.cpp:589
void cappedTruncateLastDelUpdate(OperationContext *opCtx)
Definition: record_store_v1_capped.cpp:423
OwnedPointerVector< ExtentManager::CacheHint > _extentAdvice
Definition: record_store_v1_capped.h:125
Collection *const collection
Definition: collection_info_cache_impl.cpp:53
Definition: record_store_v1_base.h:152
OperationContext Database StringData BSONObj CollectionOptions::ParseKind bool const BSONObj &idIndex Status
Definition: database_impl.cpp:956
void setCappedCallback(CappedCallback *cb) final
Definition: record_store_v1_capped.h:84
void advanceCapExtent(OperationContext *opCtx, StringData ns)
Definition: record_store_v1_capped.cpp:373
represents a disk location/offset on disk in a database.
Definition: diskloc.h:53
bool inclusive
Definition: btree_interface.cpp:335
DiskLoc lastRecord(OperationContext *opCtx, const DiskLoc &startExtent=DiskLoc()) const
Definition: record_store_v1_capped.cpp:687
DiskLoc cappedFirstDeletedInCurExtent() const
Definition: record_store_v1_capped.cpp:311
DiskLoc cappedLastDelRecLastExtent() const
Definition: record_store_v1_capped.cpp:556
void setFirstDeletedInCurExtent(OperationContext *opCtx, const DiskLoc &loc)
Definition: record_store_v1_capped.cpp:318
void cappedCheckMigrate(OperationContext *opCtx)
Definition: record_store_v1_capped.cpp:325
This class iterates over a capped collection identified by 'ns'.
Definition: record_store_v1_capped_iterator.h:44
Definition: index_key_validate.h:40
DiskLoc firstRecord(OperationContext *opCtx, const DiskLoc &startExtent=DiskLoc()) const
Definition: record_store_v1_capped.cpp:675
CappedRecordStoreV1(OperationContext *opCtx, CappedCallback *collection, StringData ns, RecordStoreV1MetaData *details, ExtentManager *em, bool isSystemIndexes)
Definition: record_store_v1_capped.cpp:71
When a capped collection is modified (delete/insert/etc) then certain notifications need to be made...
Definition: capped_callback.h:44
virtual const std::string & ns() const
Definition: record_store.h:295
StatusWith< DiskLoc > allocRecord(OperationContext *opCtx, int lengthWithHeaders, bool enforceQuota) final
Definition: record_store_v1_capped.cpp:91
void setLastDelRecLastExtent(OperationContext *opCtx, const DiskLoc &loc)
Definition: record_store_v1_capped.cpp:560
Definition: record_store_v1_capped.h:41
const RecordStoreV1MetaData * details() const
Definition: record_store_v1_base.h:231
bool nextIsInCapExtent(const DiskLoc &dl) const
Definition: record_store_v1_capped.cpp:365
ExtentManager basics.
Definition: extent_manager.h:64
CappedCallback * _cappedCallback
Definition: record_store_v1_capped.h:123
void _compact(OperationContext *opCtx)
Definition: record_store_v1_capped.cpp:265
Collection *const OperationContext *const opCtx
Definition: collection_impl.cpp:80
Status truncate(OperationContext *opCtx) final
removes all Records
Definition: record_store_v1_capped.cpp:223
DiskLoc cappedListOfAllDeletedRecords() const
Definition: record_store_v1_capped.cpp:548
const char * name() const final
Definition: record_store_v1_capped.h:52
~CappedRecordStoreV1() final
Definition: record_store_v1_capped.cpp:89
std::vector< std::unique_ptr< RecordCursor > > getManyCursors(OperationContext *opCtx) const final
Returns many RecordCursors that partition the RecordStore into many disjoint sets.
Definition: record_store_v1_capped.cpp:594
void _maybeComplain(OperationContext *opCtx, int len) const
Definition: record_store_v1_capped.cpp:647