Class: Mongo::Error::ConnectionCheckOutTimeout

Inherits:
Timeout::Error
  • Object
show all
Defined in:
lib/mongo/error/connection_check_out_timeout.rb

Overview

Note:

For backwards compatibility reasons this class derives from Timeout::Error rather than Mongo::Error.

Exception raised when trying to check out a connection from a connection pool, the pool is at its max size and no connections become available within the configured wait timeout.

Since:

  • 2.9.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, options) ⇒ ConnectionCheckOutTimeout

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.

Instantiate the new exception.

Parameters:

  • options (Hash)

    a customizable set of options

Options Hash (options):

Since:

  • 2.9.0



42
43
44
45
46
47
48
# File 'lib/mongo/error/connection_check_out_timeout.rb', line 42

def initialize(msg, options)
  super(msg)
  @address = options[:address]
  unless @address
    raise ArgumentError, 'Address argument is required'
  end
end

Instance Attribute Details

#addressMongo::Address (readonly)

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

Returns:

  • (Mongo::Address)

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

Since:

  • 2.9.0



35
36
37
# File 'lib/mongo/error/connection_check_out_timeout.rb', line 35

def address
  @address
end