类:Mongo::Monitoring::Event::Cmap::PoolReady

继承:
Base 显示全部
定义于:
lib/ Mongo/ 监控/ 事件/cmap/pool_ready.rb

Overview

当连接池标记为就绪时发布的事件。

由于:

  • 2.1.0

实例属性摘要折叠

实例方法摘要折叠

构造函数详情

#初始化(解决, 选项 , 池 ) ="PoolReady"

此方法是私有 API 的一部分。 您应尽可能避免使用此方法,因为它将来可能会被删除或更改。

创建事件。

例子:

创建事件。

PoolCreated.new(address, options, pool)

由于:

  • 2.9.0



46
47
48
49
50
# File 'lib/ Mongo/ 监控/ 事件/cmap/pool_ready.rb', line 46

def 初始化(地址, 选项, )
  @address = 地址
  @options = 选项.dup.冻结
  @pool = 
end

实例属性详细信息

#地址Mongo::Address (readonly)

返回地址池的连接将连接到的服务器的地址。

返回:

  • ( Mongo::Address )

    解决池的连接将连接到的服务器的解决。

由于:

  • 2.1.0



28
29
30
# File 'lib/ Mongo/ 监控/ 事件/cmap/pool_ready.rb', line 28

def 地址
  @address
end

# options哈希(只读)

返回为创建池指定的选项。

返回:

  • (哈希)

    options 为创建池指定的选项。

由于:

  • 2.1.0



31
32
33
# File 'lib/ Mongo/ 监控/ 事件/cmap/pool_ready.rb', line 31

def 选项
  @options
end

#Mongo::Server::ConnectionPool (只读)

创建。

返回:

由于:

  • 2.1.0



37
38
39
# File 'lib/ Mongo/ 监控/ 事件/cmap/pool_ready.rb', line 37

def 
  @pool
end

实例方法详细信息

#摘要string

注意:

此方法是实验性的,可能会发生变化。

返回简洁而有用的事件摘要。

返回:

  • ( string )

    事件摘要的string 。

由于:

  • 2.1.0



59
60
61
62
# File 'lib/ Mongo/ 监控/ 事件/cmap/pool_ready.rb', line 59

def 总结
  " #< #{ { self . class . name . sub ( / ^Mongo::Monitoring::Event::Cmap:: / , ' ' ) } " +
      "地址= #{地址}选项= #{选项}池= 0 x #{。object_id } } > "
end