Zookeeper::setWatcher

(PECL zookeeper >= 0.1.0)

Zookeeper::setWatcherSet a watcher function

说明

public Zookeeper::setWatcher ( callable $watcher_cb ) : bool

参数

watcher_cb

A watch will be set at the server to notify the client if the node changes.

返回值

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

错误/异常

This method emits PHP error/warning when parameters count or types are wrong or fail to set watcher.

Caution

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

参见

相关文章
php set reduces the set to a single value using a callback functionphp ibm db2 函数 returns a result set listing the columns and associated privileges for a tablephp gupnp 函数 set device callback functionphp ldap 函数 set a callback function to do re binds on referral chasingphp ncurses 函数 set given attributes for soft function key labelsphp newt 函数 set a callback function which gets invoked when user presses the suspend keyphp pcntl 函数 retrieve the error number set by the last pcntl function which failedphp posix 函数 retrieve the error number set by the last posix function that failedphp uopz 函数 get or set flags on function or classphp uopz 函数 gets previously set hook on function or methodphp uopz 函数 gets a previous set return value for a functionphp uopz 函数 removes previously set hook on function or methodphp uopz 函数 unsets a previously set return value for a functionphp gearmanclient set a function to be called on task completionphp mongolog gets the previously set callback functionphp zmqdevice set the idle callback functionphp zmqdevice set the timer callback functionphp zookeeper return the client session id only valid if the connections is currently connected ie. last watcher state is zoo connected state php zookeeper return the timeout for this session only valid if the connections is currently connected ie. last watcher state is zoo connected state . this value may change after a server re connectphp zookeeper set a watcher function
关注编程学问公众号