![]() |
Storage Engine API
|
Manages snapshots that can be read from at a later time. More...
#include <snapshot_manager.h>
Manages snapshots that can be read from at a later time.
Implementations must be able to handle concurrent access to any methods. No methods are allowed to acquire locks from the LockManager.
Public Member Functions | |
virtual void | setCommittedSnapshot (const Timestamp ×tamp)=0 |
Sets the snapshot to be used for committed reads. More... | |
virtual void | setLocalSnapshot (const Timestamp ×tamp)=0 |
Sets the snapshot for the last stable timestamp for reading on secondaries. More... | |
virtual boost::optional< Timestamp > | getLocalSnapshot ()=0 |
Returns the local snapshot timestamp. More... | |
virtual void | dropAllSnapshots ()=0 |
Drops all snapshots and clears the "committed" snapshot. More... | |
Protected Member Functions | |
virtual | ~SnapshotManager ()=default |
SnapshotManagers are not intended to be deleted through pointers to base type. More... | |
|
protectedvirtualdefault |
SnapshotManagers are not intended to be deleted through pointers to base type.
(virtual is just to suppress compiler warnings)
|
pure virtual |
Drops all snapshots and clears the "committed" snapshot.
Implemented in mongo::WiredTigerSnapshotManager.
|
pure virtual |
Returns the local snapshot timestamp.
Implemented in mongo::WiredTigerSnapshotManager.
|
pure virtual |
Sets the snapshot to be used for committed reads.
Implementations are allowed to assume that all older snapshots have names that compare less than the passed in name, and newer ones compare greater.
This is called while holding a very hot mutex. Therefore it should avoid doing any work that can be done later.
Implemented in mongo::WiredTigerSnapshotManager.
|
pure virtual |
Sets the snapshot for the last stable timestamp for reading on secondaries.
Implemented in mongo::WiredTigerSnapshotManager.