Storage Engine API
capped_callback.h
Go to the documentation of this file.
1 // record_store_v1_capped.h
2 
31 #pragma once
32 
33 #include "mongo/db/record_id.h"
34 
35 namespace mongo {
36 
37 class OperationContext;
38 class RecordData;
39 
45 public:
46  virtual ~CappedCallback() {}
47 
53  virtual Status aboutToDeleteCapped(OperationContext* opCtx,
54  const RecordId& loc,
55  RecordData data) = 0;
56 
60  virtual bool haveCappedWaiters() = 0;
61 
65  virtual void notifyCappedWaitersIfNeeded() = 0;
66 };
67 }
Copyright (C) 2014 MongoDB Inc.
Definition: bson_collection_catalog_entry.cpp:38
OperationContext Database StringData BSONObj CollectionOptions::ParseKind bool const BSONObj &idIndex Status
Definition: database_impl.cpp:956
virtual ~CappedCallback()
Definition: capped_callback.h:46
A replacement for the Record class.
Definition: record_data.h:43
std::shared_ptr< void > data
Definition: ephemeral_for_test_record_store_test.cpp:74
virtual bool haveCappedWaiters()=0
Returns true if there may be waiters.
virtual Status aboutToDeleteCapped(OperationContext *opCtx, const RecordId &loc, RecordData data)=0
This will be called right before loc is deleted when wrapping.
When a capped collection is modified (delete/insert/etc) then certain notifications need to be made...
Definition: capped_callback.h:44
virtual void notifyCappedWaitersIfNeeded()=0
Used to notify any waiters when new documents may be visible in the capped collection.
Collection *const OperationContext *const opCtx
Definition: collection_impl.cpp:80