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

Class: Mongo::Monitoring::Event::Cmap::ConnectionCheckedOut

Inherits:

Base

Defined in:

lib/mongo/monitoring/event/cmap/connection_checked_out.rb

Overview

Event published when a connection is successfully checked out out of a pool.

Instance Attribute Summary collapse

Instance Method Summarycollapse

Constructor Details

#initialize(address, id, pool) ⇒ ConnectionCheckedOut

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.

53 54 55 56 57 # File 'lib/mongo/monitoring/event/cmap/connection_checked_out.rb', line 53 def initialize(address, id, pool) @address = address @connection_id = id @pool = pool end

Instance Attribute Details

#addressMongo::Address

Returns address The address of the server that the connection will connect to.

32 33 34 # File 'lib/mongo/monitoring/event/cmap/connection_checked_out.rb', line 32 def address @address end

#connection_id ⇒ Integer

Returns connection_id The ID of the connection.

37 38 39 # File 'lib/mongo/monitoring/event/cmap/connection_checked_out.rb', line 37 def connection_id @connection_id end

Instance Method Details

#summary ⇒ String

Note:

This method is experimental and subject to change.

Returns a concise yet useful summary of the event.

67 68 69 70 # File 'lib/mongo/monitoring/event/cmap/connection_checked_out.rb', line 67 def summary "#<#{self.class.name.sub(/^Mongo::Monitoring::Event::Cmap::/, '')} " + "address=#{address} connection_id=#{connection_id} pool=0x#{pool.object_id}>" end