类:Mongo::Error::InvalidServerPreference

继承:
错误
  • 对象
显示全部
定义于:
lib/ Mongo/error/invalid_server_preference.rb

Overview

提供的服务器偏好无效时触发。

由于:

  • 2.0.0

常量摘要折叠

NO_TAG_SUPPORT =

为不支持标签的读取偏好指定标签时出现错误消息。

由于:

  • 2.4.0

'此读取偏好(read preference)不能与标签结合使用。'
NO_MAX_STALENESS_SUPPORT =

为不支持该最大过时度的读取偏好指定了该值时出现的错误消息。

由于:

  • 2.4.0

'无法为此读取偏好(read preference)设立max_staleness。'
NO_HEDGE_SUPPORT =

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

为不支持对冲的读取偏好指定对冲时出现错误消息。

由于:

  • 2.0.0

'无法为此读取偏好(read preference)设立对冲选项'
INVALID_MAX_STALENESS =
已弃用。

当最大过时时间不是心跳频率两倍时的错误消息。

由于:

  • 2.4.0

' `max_staleness` 值太小。它必须至少是 ' +
" `ServerSelector::SMALLEST_MAX_STALENESS_SECONDS` 和(集群的 heartbeat_Frequency " +
'设置 + `集群::IDLE_WRITE_PERIOD_SECONDS`)。'

实例方法摘要折叠

构造函数详情

#initialize (message) ⇒ InvalidServerPreference

实例化新异常。

例子:

实例化异常。

Mongo::Error::InvalidServerPreference.new

参数:

  • message ( string )

    错误消息。

由于:

  • 2.0.0



54
55
56
# File 'lib/ Mongo/error/invalid_server_preference.rb', line 54

def 初始化(message)
  
end