class Mongo::Monitoring::Event::Cmap::PoolClosed

Event published when a connection pool is closed.

@since 2.9.0

Attributes

address[R]

@return [ Mongo::Address ] address The address of the server the pool's connections will

connect to.

@since 2.9.0

pool[R]

@return [ Mongo::Server::ConnectionPool ] pool The pool that was closed.

@since 2.11.0 @api experimental

Public Class Methods

new(address, pool) click to toggle source

Create the event.

@example Create the event.

PoolClosed.new(address, pool)

@since 2.9.0 @api private

# File lib/mongo/monitoring/event/cmap/pool_closed.rb, line 44
def initialize(address, pool)
  @address = address
  @pool = pool
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/pool_closed.rb, line 57
def summary
  "#<#{self.class.name.sub(/^Mongo::Monitoring::Event::Cmap::/, '')} " +
      "address=#{address} pool=0x#{pool.object_id}>"
end