Class: Mongo::Monitoring::Event::Cmap::PoolCreated
- Inherits:
-
Base
- Object
- Event::Base
- Base
- Mongo::Monitoring::Event::Cmap::PoolCreated
- Defined in:
- lib/mongo/monitoring/event/cmap/pool_created.rb
Overview
Event published when a connection pool is created.
Instance Attribute Summary collapse
-
#address ⇒ Mongo::Address
readonly
Address The address of the server the pool’s connections will connect to.
-
#options ⇒ Hash
readonly
Options Options specified for pool creation.
-
#pool ⇒ Mongo::Server::ConnectionPool
readonly
created.
Instance Method Summary collapse
-
#initialize(address, options, pool) ⇒ PoolCreated
constructor
private
Create the event.
-
#summary ⇒ String
Returns a concise yet useful summary of the event.
Constructor Details
#initialize(address, options, pool) ⇒ PoolCreated
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.
50 51 52 53 54 |
# File 'lib/mongo/monitoring/event/cmap/pool_created.rb', line 50 def initialize(address, , pool) @address = address = .dup.freeze @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_created.rb', line 29 def address @address end |
#options ⇒ Hash (readonly)
Returns options Options specified for pool creation.
34 35 36 |
# File 'lib/mongo/monitoring/event/cmap/pool_created.rb', line 34 def end |
#pool ⇒ Mongo::Server::ConnectionPool (readonly)
created.
41 42 43 |
# File 'lib/mongo/monitoring/event/cmap/pool_created.rb', line 41 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.
64 65 66 67 |
# File 'lib/mongo/monitoring/event/cmap/pool_created.rb', line 64 def summary "#<#{self.class.name.sub(/^Mongo::Monitoring::Event::Cmap::/, '')} " + "address=#{address} options=#{options} pool=0x#{pool.object_id}>" end |