Class: Mongo::Monitoring::Event::Cmap::ConnectionReady
- Inherits:
-
Base
- Object
- Event::Base
- Base
- Mongo::Monitoring::Event::Cmap::ConnectionReady
- Defined in:
- lib/mongo/monitoring/event/cmap/connection_ready.rb
Overview
Event published when a connection is ready to be used for operations.
Instance Attribute Summary collapse
-
#address ⇒ Mongo::Address
readonly
Address The address of the server the connection is connected to.
-
#connection_id ⇒ Integer
readonly
Connection_id The ID of the connection.
Instance Method Summary collapse
-
#initialize(address, id) ⇒ ConnectionReady
constructor
private
Create the event.
-
#summary ⇒ String
Returns a concise yet useful summary of the event.
Constructor Details
#initialize(address, id) ⇒ ConnectionReady
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.
43 44 45 46 |
# File 'lib/mongo/monitoring/event/cmap/connection_ready.rb', line 43 def initialize(address, id) @address = address @connection_id = id end |
Instance Attribute Details
#address ⇒ Mongo::Address (readonly)
Returns address The address of the server the connection is connected to.
29 30 31 |
# File 'lib/mongo/monitoring/event/cmap/connection_ready.rb', line 29 def address @address end |
#connection_id ⇒ Integer (readonly)
Returns connection_id The ID of the connection.
34 35 36 |
# File 'lib/mongo/monitoring/event/cmap/connection_ready.rb', line 34 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.
56 57 58 59 |
# File 'lib/mongo/monitoring/event/cmap/connection_ready.rb', line 56 def summary "#<#{self.class.name.sub(/^Mongo::Monitoring::Event::Cmap::/, '')} " + "address=#{address} connection_id=#{connection_id}>" end |