Class: Mongo::Monitoring::Event::Cmap::PoolReady

Inherits:
Base show all
Defined in:
build/ruby-driver-v2.19/lib/mongo/monitoring/event/cmap/pool_ready.rb

Overview

Event published when a connection pool is marked ready.

Since:

  • 2.1.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(address, options, pool) ⇒ PoolReady

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.

PoolCreated.new(address, options, pool)

Since:

  • 2.9.0



46
47
48
49
50
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/cmap/pool_ready.rb', line 46

def initialize(address, options, pool)
  @address = address
  @options = options.dup.freeze
  @pool = pool
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.1.0



28
29
30
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/cmap/pool_ready.rb', line 28

def address
  @address
end

#optionsHash (readonly)

Returns options Options specified for pool creation.

Returns:

  • (Hash)

    options Options specified for pool creation.

Since:

  • 2.1.0



31
32
33
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/cmap/pool_ready.rb', line 31

def options
  @options
end

#poolMongo::Server::ConnectionPool (readonly)

created.

Returns:

Since:

  • 2.1.0



37
38
39
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/cmap/pool_ready.rb', line 37

def pool
  @pool
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.1.0



59
60
61
62
# File 'build/ruby-driver-v2.19/lib/mongo/monitoring/event/cmap/pool_ready.rb', line 59

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