ConnectionCheckOutFailed — Documentation by YARD 0.9.37 (original) (raw)

Class: Mongo::Monitoring::Event::Cmap::ConnectionCheckOutFailed

Inherits:

Base

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 Summarycollapse

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

Instance Method Summarycollapse

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

#addressMongo::Address

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

#reasonSymbol

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

Note:

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