Class: Mongo::Monitoring::Event::Cmap::ConnectionCheckedIn
- Inherits:
-
Base
- Object
- Event::Base
- Base
- Mongo::Monitoring::Event::Cmap::ConnectionCheckedIn
- Defined in:
- lib/mongo/monitoring/event/cmap/connection_checked_in.rb
Overview
Event published when a connection is returned to a connection pool.
Instance Attribute Summary collapse
-
#address ⇒ Address
readonly
Address The address of the server the connection was connected to.
-
#connection_id ⇒ Integer
readonly
Connection_id The ID of the connection.
-
#pool ⇒ Mongo::Server::ConnectionPool
readonly
was checked in to.
Instance Method Summary collapse
-
#initialize(address, id, pool) ⇒ ConnectionCheckedIn
constructor
private
Create the event.
-
#summary ⇒ String
Returns a concise yet useful summary of the event.
Constructor Details
#initialize(address, id, pool) ⇒ ConnectionCheckedIn
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.
49 50 51 52 53 |
# File 'lib/mongo/monitoring/event/cmap/connection_checked_in.rb', line 49 def initialize(address, id, pool) @address = address @connection_id = id @pool = pool end |
Instance Attribute Details
#address ⇒ Address (readonly)
Returns address The address of the server the connection was connected to.
28 29 30 |
# File 'lib/mongo/monitoring/event/cmap/connection_checked_in.rb', line 28 def address @address end |
#connection_id ⇒ Integer (readonly)
Returns connection_id The ID of the connection.
33 34 35 |
# File 'lib/mongo/monitoring/event/cmap/connection_checked_in.rb', line 33 def connection_id @connection_id end |
#pool ⇒ Mongo::Server::ConnectionPool (readonly)
was checked in to.
40 41 42 |
# File 'lib/mongo/monitoring/event/cmap/connection_checked_in.rb', line 40 def pool @pool end |
Instance Method Details
#summary ⇒ String
Note:
This method is experimental and subject to change.
Returns a concise yet useful summary of the event.
63 64 65 66 |
# File 'lib/mongo/monitoring/event/cmap/connection_checked_in.rb', line 63 def summary "#<#{self.class.name.sub(/^Mongo::Monitoring::Event::Cmap::/, '')} " + "address=#{address} connection_id=#{connection_id} pool=0x#{pool.object_id}>" end |