Class: Mongo::Monitoring::Event::Cmap::ConnectionCheckOutFailed
- Inherits:
-
Base
- Object
- Event::Base
- Base
- Mongo::Monitoring::Event::Cmap::ConnectionCheckOutFailed
- Defined in:
- lib/mongo/monitoring/event/cmap/connection_check_out_failed.rb
Overview
Event published when a connection is unable to be checked out of a pool.
Constant Summary collapse
- POOL_CLOSED =
Returns POOL_CLOSED Indicates that the connection check out failed due to the pool already being closed.
:pool_closed
- TIMEOUT =
Returns TIMEOUT Indicates that the connection check out failed due to the timeout being reached before a connection became available.
:timeout
- CONNECTION_ERROR =
Returns CONNECTION_ERROR Indicates that the connection check out failed due to an error encountered while setting up a new connection.
:connection_error
Instance Attribute Summary collapse
-
#address ⇒ Mongo::Address
readonly
Address The address of the server the connection would have connected to.
-
#reason ⇒ Symbol
readonly
Reason The reason a connection was unable to be acquired.
Instance Method Summary collapse
-
#initialize(address, reason) ⇒ ConnectionCheckOutFailed
constructor
private
Create the event.
-
#summary ⇒ String
Returns a concise yet useful summary of the event.
Constructor Details
#initialize(address, reason) ⇒ ConnectionCheckOutFailed
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.
Create the event.
67 68 69 70 |
# File 'lib/mongo/monitoring/event/cmap/connection_check_out_failed.rb', line 67 def initialize(address, reason) @reason = reason @address = address end |
Instance Attribute Details
#address ⇒ Mongo::Address (readonly)
Returns address The address of the server the connection would have connected to.
52 53 54 |
# File 'lib/mongo/monitoring/event/cmap/connection_check_out_failed.rb', line 52 def address @address end |
#reason ⇒ Symbol (readonly)
Returns reason The reason a connection was unable to be acquired.
58 59 60 |
# File 'lib/mongo/monitoring/event/cmap/connection_check_out_failed.rb', line 58 def reason @reason end |
Instance Method Details
#summary ⇒ String
This method is experimental and subject to change.
Returns a concise yet useful summary of the event.
80 81 82 83 |
# File 'lib/mongo/monitoring/event/cmap/connection_check_out_failed.rb', line 80 def summary "#<#{self.class.name.sub(/^Mongo::Monitoring::Event::Cmap::/, '')} address=#{address} " + "reason=#{reason}>" end |