class Mongo::Monitoring::Event::Cmap::ConnectionReady

Event published when a connection is ready to be used for operations.

@since 2.9.0

Attributes

address[R]

@return [ Mongo::Address ] address The address of the server the connection is connected

to.

@since 2.9.0

connection_id[R]

@return [ Integer ] connection_id The ID of the connection.

@since 2.9.0

Public Class Methods

new(address, id) click to toggle source

Create the event.

@example Create the event.

ConnectionReady.new(address, id)

@since 2.9.0 @api private

# File lib/mongo/monitoring/event/cmap/connection_ready.rb, line 43
def initialize(address, id)
  @address = address
  @connection_id = id
end

Public Instance Methods

summary() click to toggle source

Returns a concise yet useful summary of the event.

@return [ String ] String summary of the event.

@note This method is experimental and subject to change.

@since 2.9.0 @api experimental

# 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