diff options
author | Randolph Tan <randolph@10gen.com> | 2015-04-20 15:36:09 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2015-05-11 10:09:05 -0400 |
commit | 9f0ceef0b37df2525cdebb172e6b05e2db8a2b20 (patch) | |
tree | 11fa779defcac750089916964aeee605d3330a17 /src/mongo/db/operation_context_noop.h | |
parent | b73ab5765fb75ae87ee5ad0f4afbc4fdfc2bc151 (diff) | |
download | mongo-9f0ceef0b37df2525cdebb172e6b05e2db8a2b20.tar.gz |
SERVER-18195 Read after optime (repl only)
Diffstat (limited to 'src/mongo/db/operation_context_noop.h')
-rw-r--r-- | src/mongo/db/operation_context_noop.h | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/mongo/db/operation_context_noop.h b/src/mongo/db/operation_context_noop.h index 0b2650531ce..f27f3d1ef96 100644 --- a/src/mongo/db/operation_context_noop.h +++ b/src/mongo/db/operation_context_noop.h @@ -53,62 +53,66 @@ namespace mongo { virtual ~OperationContextNoop() { } - virtual Client* getClient() const { + virtual Client* getClient() const override { invariant(false); return NULL; } - virtual CurOp* getCurOp() const { + virtual CurOp* getCurOp() const override { invariant(false); return NULL; } - virtual RecoveryUnit* recoveryUnit() const { + virtual RecoveryUnit* recoveryUnit() const override { return _recoveryUnit.get(); } - virtual RecoveryUnit* releaseRecoveryUnit() { + virtual RecoveryUnit* releaseRecoveryUnit() override { return _recoveryUnit.release(); } - virtual void setRecoveryUnit(RecoveryUnit* unit) { + virtual void setRecoveryUnit(RecoveryUnit* unit) override { _recoveryUnit.reset(unit); } - virtual Locker* lockState() const { + virtual Locker* lockState() const override { return _locker.get(); } virtual ProgressMeter* setMessage(const char * msg, const std::string &name, unsigned long long progressMeterTotal, - int secondsBetween) { + int secondsBetween) override { return &_pm; } - virtual void checkForInterrupt() const { } - virtual Status checkForInterruptNoAssert() const { + virtual void checkForInterrupt() const override { } + virtual Status checkForInterruptNoAssert() const override { return Status::OK(); } - virtual bool isPrimaryFor( StringData ns ) { + virtual bool isPrimaryFor( StringData ns ) override { return true; } - virtual std::string getNS() const { + virtual std::string getNS() const override { return std::string(); }; - virtual unsigned int getOpID() const { + virtual unsigned int getOpID() const override { return 0; } - void setReplicatedWrites(bool writesAreReplicated = true) {} + void setReplicatedWrites(bool writesAreReplicated = true) override {} - bool writesAreReplicated() const { + bool writesAreReplicated() const override { return false; } + virtual uint64_t getRemainingMaxTimeMicros() const override { + return 0; + } + private: std::auto_ptr<RecoveryUnit> _recoveryUnit; boost::scoped_ptr<Locker> _locker; |