NoServiceConnectionAvailable — Documentation by YARD 0.9.37 (original) (raw)
Exception: Mongo::Error::NoServiceConnectionAvailable
Inherits:
- Object
- StandardError
- Mongo::Error
- Mongo::Error::NoServiceConnectionAvailable show all
Defined in:
lib/mongo/error/no_service_connection_available.rb
Overview
Raised when the driver requires a connection to a particular service but no matching connections exist in the connection pool.
Constant Summary
Constants inherited from Mongo::Error
BAD_VALUE, CODE, CURSOR_NOT_FOUND, ERR, ERRMSG, ERROR, TRANSIENT_TRANSACTION_ERROR_LABEL, UNKNOWN_ERROR, UNKNOWN_TRANSACTION_COMMIT_RESULT_LABEL, WRITE_CONCERN_ERROR, WRITE_CONCERN_ERRORS, WRITE_ERRORS
Instance Attribute Summary collapse
- #address ⇒ Mongo::Address readonly
The address to which a connection was requested. - #service_id ⇒ nil | Object readonly
The service id.
Attributes included from Notable
#connection_global_id, #generation
Class Method Summarycollapse
Instance Method Summarycollapse
- #initialize(message, address:, service_id:) ⇒ NoServiceConnectionAvailable constructor private
A new instance of NoServiceConnectionAvailable.
Methods inherited from Mongo::Error
#change_stream_resumable?, #network_error?, #write_concern_error_label?, #write_concern_error_labels
Methods included from ChangeStreamResumable
Methods included from WriteRetryable
Methods included from Labelable
Methods included from Notable
#add_note, #add_notes, #notes, #to_s
Constructor Details
#initialize(message, address:, service_id:) ⇒ NoServiceConnectionAvailable
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.
Returns a new instance of NoServiceConnectionAvailable.
25 26 27 28 29 30 | # File 'lib/mongo/error/no_service_connection_available.rb', line 25 def initialize(message, address:, service_id:) super(message) @address = address @service_id = service_id end |
---|
Instance Attribute Details
#address ⇒ Mongo::Address
Returns The address to which a connection was requested.
34 35 36 | # File 'lib/mongo/error/no_service_connection_available.rb', line 34 def address @address end |
---|
#service_id ⇒ nil | Object
37 38 39 | # File 'lib/mongo/error/no_service_connection_available.rb', line 37 def service_id @service_id end |
---|
Class Method Details
.generate(address:, service_id:) ⇒ Object
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.
40 41 42 43 44 45 46 | # File 'lib/mongo/error/no_service_connection_available.rb', line 40 def self.generate(address:, service_id:) new( "The connection pool for #{address} does not have a connection for service #{service_id}", address: address, service_id: service_id, ) end |
---|