Class: Mongo::Monitoring::Event::Cmap::PoolClosed
- Inherits:
-
Base
- Object
- Event::Base
- Base
- Mongo::Monitoring::Event::Cmap::PoolClosed
- Defined in:
- lib/mongo/monitoring/event/cmap/pool_closed.rb
Overview
Event published when a connection pool is closed.
Instance Attribute Summary collapse
-
#address ⇒ Mongo::Address
readonly
Address The address of the server the pool’s connections will connect to.
-
#pool ⇒ Mongo::Server::ConnectionPool
readonly
Pool The pool that was closed.
Instance Method Summary collapse
-
#initialize(address, pool) ⇒ PoolClosed
constructor
private
Create the event.
-
#summary ⇒ String
Returns a concise yet useful summary of the event.
Constructor Details
#initialize(address, pool) ⇒ PoolClosed
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.
44 45 46 47 |
# File 'lib/mongo/monitoring/event/cmap/pool_closed.rb', line 44 def initialize(address, pool) @address = address @pool = pool end |
Instance Attribute Details
#address ⇒ Mongo::Address (readonly)
Returns address The address of the server the pool’s connections will connect to.
29 30 31 |
# File 'lib/mongo/monitoring/event/cmap/pool_closed.rb', line 29 def address @address end |
#pool ⇒ Mongo::Server::ConnectionPool (readonly)
Returns pool The pool that was closed.
35 36 37 |
# File 'lib/mongo/monitoring/event/cmap/pool_closed.rb', line 35 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.
57 58 59 60 |
# 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 |