Module: Mongo::Operation::CausalConsistencySupported Private
Do not use. This module is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/mongo/operation/shared/causal_consistency_supported.rb |
Overview
Custom behavior for operations that support causal consistency.
Instance Method Summary
-
#apply_causal_consistency!(selector, connection)
private
Internal use only
Adds causal consistency document to the selector, if one can be constructed.
Instance Method Details
#apply_causal_consistency!(selector, connection) (private)
Adds causal consistency document to the selector, if one can be constructed.
This method overrides the causal consistency addition logic of SessionsSupported
and is meant to be used with operations classified as “read operations accepting a read concern”, as these are defined in the causal consistency spec.
In order for the override to work correctly the CausalConsistencySupported
module must be included after SessionsSupported
module in target classes.
# File 'lib/mongo/operation/shared/causal_consistency_supported.rb', line 40
def apply_causal_consistency!(selector, connection) apply_causal_consistency_if_possible(selector, connection) end