类:Mongo::Monitoring::Event::Cmap::ConnectionCheckedIn

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

Overview

当连接返回到连接池时发布的事件。

由于:

  • 2.9.0

实例属性摘要折叠

实例方法摘要折叠

构造函数详情

#初始化(解决, ID , 池 ) ⇒ ConnectionCheckedIn

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

创建事件。

例子:

创建事件。

ConnectionCheckedIn.new(address, id, pool)

由于:

  • 2.9.0



52
53
54
55
56
# File 'lib/ Mongo/ 监控/ 事件/cmap/connection_checked_in.rb', line 52

def 初始化(地址, id, )
  @address = 地址
  @connection_id = id
  @pool = 
end

实例属性详细信息

#解决地址(只读)

返回解决连接所连接到的服务器的解决。

返回:

  • (地址)

    解决连接所连接到的服务器的解决。

由于:

  • 2.9.0



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

def 地址
  @address
end

# connection_id整数(只读)

返回 connection_id 连接的 ID。

返回:

  • ( Integer )

    connection_id 连接的ID 。

由于:

  • 2.9.0



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

def connection_id
  @connection_id
end

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

已签入到。

返回:

由于:

  • 2.11.0



43
44
45
# File 'lib/ Mongo/ 监控/ 事件/cmap/connection_checked_in.rb', line 43

def 
  @pool
end

实例方法详细信息

#摘要string

注意:

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

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

返回:

  • ( string )

    事件摘要的string 。

由于:

  • 2.9.0



66
67
68
69
# File 'lib/ Mongo/ 监控/ 事件/cmap/connection_checked_in.rb', line 66

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