Add GetSharedSnapshot() to Transaction
This commit is contained in:
parent
45b2bc6124
commit
14a7f26642
@ -193,6 +193,10 @@ class Transaction {
|
||||
// is called, or the Transaction is deleted.
|
||||
virtual const Snapshot* GetSnapshot() const = 0;
|
||||
|
||||
// Returns the Snapshot created by the last call to SetSnapshot().
|
||||
// The returned snapshot can outlive the transaction.
|
||||
virtual std::shared_ptr<const Snapshot> GetSharedSnapshot() const = 0;
|
||||
|
||||
// Clears the current snapshot (i.e. no snapshot will be 'set')
|
||||
//
|
||||
// This removes any snapshot that currently exists or is set to be created
|
||||
|
@ -206,6 +206,10 @@ class TransactionBaseImpl : public Transaction {
|
||||
return snapshot_.get();
|
||||
}
|
||||
|
||||
std::shared_ptr<const Snapshot> GetSharedSnapshot() const override {
|
||||
return snapshot_;
|
||||
}
|
||||
|
||||
virtual void SetSnapshot() override;
|
||||
void SetSnapshotOnNextOperation(
|
||||
std::shared_ptr<TransactionNotifier> notifier = nullptr) override;
|
||||
|
Loading…
Reference in New Issue
Block a user