Zookeeper::setDeterministicConnOrder

(PECL zookeeper >= 0.1.0)

Zookeeper::setDeterministicConnOrderEnable/disable quorum endpoint order randomization

说明

public static bool Zookeeper::setDeterministicConnOrder ( bool $yesOrNo )

If passed a non-zero value, will make the client connect to quorum peers in the order as specified in the zookeeper_init() call. A zero value causes zookeeper_init() to permute the peer endpoints which is good for more even client connection distribution among the quorum peers.

参数

yesOrNo

Enable/disable quorum endpoint order randomization.

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE

错误/异常

This method emits PHP error/warning when parameters count or types are wrong or operation fails.

Caution

Since version 0.3.0, this method emits ZookeeperException and it's derivatives.

注释

Caution

Note: typically this method should NOT be used outside of testing.

Note: 因为是一个语言构造器而不是一个函数,不能被 可变函数 调用。

Warning

此函数(还)不能安全地适用于二进制对象!

Note: register_globals 重要说明:

自 PHP 4.2.0 起,PHP 指令 register_globals 的默认值为 off。PHP 社区鼓励开发者不要依赖于此指令, 用其他手段替代,例如superglobals

参见

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top