Consumer — Documentation by YARD 0.9.37 (original) (raw)

Module: Mongo::ClusterTime::ConsumerPrivate

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Note:

Although attributes and methods defined in this module are part of the public API for the classes including this module, the fact that the methods are defined on this module and not directly on the including classes is not part of the public API.

This module provides common cluster time tracking behavior.

Instance Attribute Summary collapse

Instance Method Summarycollapse

Instance Attribute Details

#cluster_time ⇒ nil | ClusterTime

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

The cluster time tracked by the object including this module.

Changed in version 2.9.0: This attribute became an instance of ClusterTime, which is a subclass of BSON::Document. Previously it was an instance of BSON::Document.

123 124 125 # File 'lib/mongo/cluster_time.rb', line 123 def cluster_time @cluster_time end

Instance Method Details

#advance_cluster_time(new_cluster_time) ⇒ ClusterTime

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Advance the tracked cluster time document for the object including this module.

133 134 135 136 137 138 139 # File 'lib/mongo/cluster_time.rb', line 133 def advance_cluster_time(new_cluster_time) if @cluster_time @cluster_time = @cluster_time.advance(new_cluster_time) else @cluster_time = ClusterTime[new_cluster_time] end end