Class: Mongo::Error::InvalidServerPreference
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Error
|
|
|
Instance Chain:
self,
Error
|
|
| Inherits: |
Error
|
| Defined in: | lib/mongo/error/invalid_server_preference.rb |
Overview
Raised when an invalid server preference is provided.
Constant Summary
-
INVALID_MAX_STALENESS =
# File 'lib/mongo/error/invalid_server_preference.rb', line 45Deprecated.
::Mongo::Errormessage for when the max staleness is not at least twice the heartbeat frequency.'`max_staleness` value is too small. It must be at least ' + "`ServerSelector::SMALLEST_MAX_STALENESS_SECONDS` and (the cluster's heartbeat_frequency " + 'setting + `Cluster::IDLE_WRITE_PERIOD_SECONDS`).'
-
NO_HEDGE_SUPPORT =
Internal use only
# File 'lib/mongo/error/invalid_server_preference.rb', line 39Deprecated.
Hedged reads are deprecated in MongoDB Server 8.0 and will be removed in a future version.
::Mongo::Errormessage when hedge is specified for a read preference that does not support it.'The hedge option cannot be set for this read preference' -
NO_MAX_STALENESS_SUPPORT =
# File 'lib/mongo/error/invalid_server_preference.rb', line 31
::Mongo::Errormessage when a max staleness is specified for a read preference that cannot support it.'max_staleness cannot be set for this read preference.' -
NO_TAG_SUPPORT =
# File 'lib/mongo/error/invalid_server_preference.rb', line 26
::Mongo::Errormessage when tags are specified for a read preference that cannot support them.'This read preference cannot be combined with tags.'
Class Method Summary
-
.new(message) ⇒ InvalidServerPreference
constructor
Instantiate the new exception.
Constructor Details
.new(message) ⇒ InvalidServerPreference
Instantiate the new exception.
# File 'lib/mongo/error/invalid_server_preference.rb', line 57
def initialize() super end