123456789_123456789_123456789_123456789_123456789_

Class: Mongo::Monitoring::Event::Cmap::PoolCleared

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Mongo::Monitoring::Event::Cmap::Base
Defined in: lib/mongo/monitoring/event/cmap/pool_cleared.rb

Overview

::Mongo::Monitoring::Event published when a connection pool is cleared.

Since:

  • 2.9.0

Class Method Summary

Instance Attribute Summary

Instance Method Summary

::Mongo::Event::Base - Inherited

#summary

Returns a concise yet useful summary of the event.

#short_class_name

Constructor Details

.new(address, service_id: nil, interrupt_in_use_connections: nil) ⇒ PoolCleared

Create the event.

Parameters:

  • address (Address)
  • service_id (Object)

    The service id, if any.

  • interrupt_in_use_connections (true | false | nil)

    The interrupt_in_use_connections flag, if given.

Since:

  • 2.9.0

[ GitHub ]

  
# File 'lib/mongo/monitoring/event/cmap/pool_cleared.rb', line 45

def initialize(address, service_id: nil, interrupt_in_use_connections: nil)
  @address = address
  @service_id = service_id
  @options = {}
  @options[:interrupt_in_use_connections] = interrupt_in_use_connections
end

Instance Attribute Details

#addressMongo::Address (readonly)

Returns:

  • (Mongo::Address)

    address The address of the server the pool's connections will connect to.

Since:

  • 2.9.0

[ GitHub ]

  
# File 'lib/mongo/monitoring/event/cmap/pool_cleared.rb', line 29

attr_reader :address

#optionsHash (readonly)

Returns:

  • (Hash)

    options The options

Since:

  • 2.9.0

[ GitHub ]

  
# File 'lib/mongo/monitoring/event/cmap/pool_cleared.rb', line 35

attr_reader :options

#service_idnil | Object (readonly)

Returns:

  • (nil | Object)

    The service id, if any.

Since:

  • 2.9.0

[ GitHub ]

  
# File 'lib/mongo/monitoring/event/cmap/pool_cleared.rb', line 32

attr_reader :service_id

Instance Method Details

#summaryString

Note:

This method is experimental and subject to change.

Returns a concise yet useful summary of the event.

Returns:

  • (String)

    String summary of the event.

Since:

  • 2.9.0

[ GitHub ]

  
# File 'lib/mongo/monitoring/event/cmap/pool_cleared.rb', line 60

def summary
  "#<#{self.class.name.sub(/^Mongo::Monitoring::Event::Cmap::/, '')} address=#{address}>"
end