Storage Engine API
snapshot_manager.h
Go to the documentation of this file.
1 
29 #pragma once
30 
31 #include <limits>
32 #include <string>
33 
34 #include "mongo/base/status.h"
35 #include "mongo/bson/timestamp.h"
36 #include "mongo/db/operation_context.h"
37 #include "mongo/util/assert_util.h"
38 
39 namespace mongo {
40 
48 public:
58  virtual void setCommittedSnapshot(const Timestamp& timestamp) = 0;
59 
63  virtual void setLocalSnapshot(const Timestamp& timestamp) = 0;
64 
68  virtual boost::optional<Timestamp> getLocalSnapshot() = 0;
69 
73  virtual void dropAllSnapshots() = 0;
74 
75 protected:
80  virtual ~SnapshotManager() = default;
81 };
82 
83 } // namespace mongo
Copyright (C) 2014 MongoDB Inc.
Definition: bson_collection_catalog_entry.cpp:38
virtual void dropAllSnapshots()=0
Drops all snapshots and clears the "committed" snapshot.
virtual void setCommittedSnapshot(const Timestamp &timestamp)=0
Sets the snapshot to be used for committed reads.
virtual boost::optional< Timestamp > getLocalSnapshot()=0
Returns the local snapshot timestamp.
virtual ~SnapshotManager()=default
SnapshotManagers are not intended to be deleted through pointers to base type.
Manages snapshots that can be read from at a later time.
Definition: snapshot_manager.h:47
virtual void setLocalSnapshot(const Timestamp &timestamp)=0
Sets the snapshot for the last stable timestamp for reading on secondaries.