Functionality for getting an object able to select a server, given a preference.
@since 2.0.0
| LOCAL_THRESHOLD | = | 0.015.freeze |
The max latency in seconds between the closest server and other servers
considered for selection.
@since 2.0.0 |
|
| SERVER_SELECTION_TIMEOUT | = | 30.freeze |
How long to block for server selection before throwing an exception.
@since 2.0.0 |
|
| SMALLEST_MAX_STALENESS_SECONDS | = | 90 |
The smallest allowed max staleness value, in seconds.
@since 2.4.0 |
|
| PRIMARY | = | Options::Redacted.new(mode: :primary).freeze |
Primary read preference.
@since 2.1.0 |
|
| PREFERENCES | = | { nearest: Nearest, primary: Primary, primary_preferred: PrimaryPreferred, secondary: Secondary, secondary_preferred: SecondaryPreferred |
Hash lookup for the selector classes based off the symbols
provided in configuration. @since 2.0.0 |