diff options
author | Jack Mulrow <jack.mulrow@mongodb.com> | 2018-05-10 10:39:04 -0400 |
---|---|---|
committer | Jack Mulrow <jack.mulrow@mongodb.com> | 2018-05-14 11:17:11 -0400 |
commit | 15d7cab640425bcb4de62e6b3c13d9188181f5ce (patch) | |
tree | 00f0d5c9b7ffdad41eae1eabed904bd82dec97db /src/mongo/db/logical_clock.h | |
parent | 8e27c2b49ba17fe9b02695efb29a6322b56c2f23 (diff) | |
download | mongo-15d7cab640425bcb4de62e6b3c13d9188181f5ce.tar.gz |
SERVER-34674 Remove _isEnabled invariants from the logical clock
Diffstat (limited to 'src/mongo/db/logical_clock.h')
-rw-r--r-- | src/mongo/db/logical_clock.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/db/logical_clock.h b/src/mongo/db/logical_clock.h index e0f5c135c1c..4145185fc6f 100644 --- a/src/mongo/db/logical_clock.h +++ b/src/mongo/db/logical_clock.h @@ -58,7 +58,7 @@ public: static LogicalTime getClusterTimeForReplicaSet(OperationContext* opCtx); /** - * Creates an instance of LogicalClock. + * Creates an instance of LogicalClock. */ LogicalClock(ServiceContext*); @@ -89,14 +89,15 @@ public: void setClusterTimeFromTrustedSource(LogicalTime newTime); /** - * Returns true if the clock is enabled and can be used. + * Returns true if the clock is enabled and can be used. Defaults to true. */ bool isEnabled() const; /** - * Passing "true" enables the clock. + * Disables the logical clock. A disabled clock won't process logical times and can't be + * re-enabled. */ - void setEnabled(bool isEnabled); + void disable(); private: /** |