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

Inherits:
Base show all
Defined in:
lib/mongo/monitoring/event/cmap/pool_cleared.rb

Overview

Event published when a connection pool is cleared.

Since:

  • 2.9.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(address) ⇒ 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.

Examples:

Create the event.

PoolCleared.new(address)

Since:

  • 2.9.0



38
39
40
# File 'lib/mongo/monitoring/event/cmap/pool_cleared.rb', line 38

def initialize(address)
  @address = address
end

Instance Attribute Details

#addressMongo::Address (readonly)

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

Returns:

  • (Mongo::Address)

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

Since:

  • 2.9.0



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

def address
  @address
end

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



50
51
52
# File 'lib/mongo/monitoring/event/cmap/pool_cleared.rb', line 50

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