Class: Mongo::Monitoring::Event::Cmap::PoolCleared
- Inherits:
-
Base
- Object
- Event::Base
- Base
- Mongo::Monitoring::Event::Cmap::PoolCleared
- Defined in:
- lib/mongo/monitoring/event/cmap/pool_cleared.rb
Overview
Event published when a connection pool is cleared.
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 The options.
-
#service_id ⇒ nil | Object
readonly
The service id, if any.
Instance Method Summary collapse
-
#initialize(address, service_id: nil, interrupt_in_use_connections: nil) ⇒ PoolCleared
constructor
private
Create the event.
-
#summary ⇒ String
Returns a concise yet useful summary of the event.
Constructor Details
#initialize(address, service_id: nil, interrupt_in_use_connections: nil) ⇒ PoolCleared
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.
45 46 47 48 49 50 51 |
# File 'lib/mongo/monitoring/event/cmap/pool_cleared.rb', line 45 def initialize(address, service_id: nil, interrupt_in_use_connections: nil) super() @address = address @service_id = service_id @options = {} @options[:interrupt_in_use_connections] = interrupt_in_use_connections 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_cleared.rb', line 29 def address @address end |
#options ⇒ Hash (readonly)
Returns options The options.
35 36 37 |
# File 'lib/mongo/monitoring/event/cmap/pool_cleared.rb', line 35 def @options end |
#service_id ⇒ nil | Object (readonly)
Returns The service id, if any.
32 33 34 |
# File 'lib/mongo/monitoring/event/cmap/pool_cleared.rb', line 32 def service_id @service_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.
61 62 63 |
# File 'lib/mongo/monitoring/event/cmap/pool_cleared.rb', line 61 def summary "#<#{self.class.name.sub(/^Mongo::Monitoring::Event::Cmap::/, '')} address=#{address}>" end |