Storage Engine API
mongo::CappedCallback Class Referenceabstract

When a capped collection is modified (delete/insert/etc) then certain notifications need to be made, which this (pure virtual) interface exposes. More...

#include <capped_callback.h>

Inheritance diagram for mongo::CappedCallback:
mongo::Collection mongo::Collection::Impl mongo::CollectionImpl mongo::CollectionMock mongo::CollectionImpl mongo::CollectionMock

Detailed Description

When a capped collection is modified (delete/insert/etc) then certain notifications need to be made, which this (pure virtual) interface exposes.

Public Member Functions

virtual ~CappedCallback ()
 
virtual Status aboutToDeleteCapped (OperationContext *opCtx, const RecordId &loc, RecordData data)=0
 This will be called right before loc is deleted when wrapping. More...
 
virtual bool haveCappedWaiters ()=0
 Returns true if there may be waiters. More...
 
virtual void notifyCappedWaitersIfNeeded ()=0
 Used to notify any waiters when new documents may be visible in the capped collection. More...
 

Constructor & Destructor Documentation

◆ ~CappedCallback()

virtual mongo::CappedCallback::~CappedCallback ( )
inlinevirtual

Member Function Documentation

◆ aboutToDeleteCapped()

virtual Status mongo::CappedCallback::aboutToDeleteCapped ( OperationContext *  opCtx,
const RecordId &  loc,
RecordData  data 
)
pure virtual

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.

Implemented in mongo::Collection, mongo::CollectionImpl, mongo::Collection::Impl, and mongo::CollectionMock.

◆ haveCappedWaiters()

virtual bool mongo::CappedCallback::haveCappedWaiters ( )
pure virtual

Returns true if there may be waiters.

Implemented in mongo::Collection, mongo::CollectionImpl, mongo::Collection::Impl, and mongo::CollectionMock.

◆ notifyCappedWaitersIfNeeded()

virtual void mongo::CappedCallback::notifyCappedWaitersIfNeeded ( )
pure virtual

Used to notify any waiters when new documents may be visible in the capped collection.

Implemented in mongo::Collection, mongo::CollectionImpl, mongo::Collection::Impl, and mongo::CollectionMock.


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