<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Enable/disable quorum endpoint order randomization</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="zookeeper.setdebuglevel.html">Zookeeper::setDebugLevel</a></div> <div class="next" style="text-align: right; float: right;"><a href="zookeeper.setlogstream.html">Zookeeper::setLogStream</a></div> <div class="up"><a href="class.zookeeper.html">Zookeeper</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="zookeeper.setdeterministicconnorder" class="refentry"> <div class="refnamediv"> <h1 class="refname">Zookeeper::setDeterministicConnOrder</h1> <p class="verinfo">(PECL zookeeper >= 0.1.0)</p><p class="refpurpose"><span class="refname">Zookeeper::setDeterministicConnOrder</span> — <span class="dc-title">Enable/disable quorum endpoint order randomization</span></p> </div> <div class="refsect1 description" id="refsect1-zookeeper.setdeterministicconnorder-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="modifier">static</span> <span class="type">bool</span> <span class="methodname"><strong>Zookeeper::setDeterministicConnOrder</strong></span> ( <span class="methodparam"><span class="type">bool</span> <code class="parameter">$yesOrNo</code></span> )</div> <p class="para rdfs-comment"> 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. </p> </div> <div class="refsect1 parameters" id="refsect1-zookeeper.setdeterministicconnorder-parameters"> <h3 class="title">Parameters</h3> <dl> <dt> <code class="parameter">yesOrNo</code></dt> <dd> <p class="para"> Enable/disable quorum endpoint order randomization. </p> </dd> </dl> </div> <div class="refsect1 returnvalues" id="refsect1-zookeeper.setdeterministicconnorder-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure. </p> </div> <div class="refsect1 errors" id="refsect1-zookeeper.setdeterministicconnorder-errors"> <h3 class="title">Errors/Exceptions</h3> <p class="para"> This method emits PHP error/warning when parameters count or types are wrong or operation fails. </p> <div class="caution"><strong class="caution">Caution</strong> <p class="para"> Since version 0.3.0, this method emits <strong class="classname">ZookeeperException</strong> and it's derivatives. </p> </div> </div> <div class="refsect1 notes" id="refsect1-zookeeper.setdeterministicconnorder-notes"> <h3 class="title">Notes</h3> <div class="caution"><strong class="caution">Caution</strong> <p class="para"> Note: typically this method should NOT be used outside of testing. </p> </div> <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">Because this is a language construct and not a function, it cannot be called using <a href="functions.variable-functions.html" class="link">variable functions</a>.</span> </p></blockquote> <div class="warning"><strong class="warning">Warning</strong><p class="simpara">This function is not (yet) binary safe!</p></div> <blockquote class="note"><p><strong class="note">Note</strong>: <strong>register_globals: important note</strong><br /><p class="para">As of PHP 4.2.0, the default value for the PHP directive <a href="ini.core.html#ini.register-globals" class="link">register_globals</a> is <em class="emphasis"> off</em>. The PHP community discourages developers from relying on this directive, and encourages the use of other means, such as the <a href="language.variables.predefined.html" class="link">superglobals</a>.</p></p></blockquote> </div> <div class="refsect1 seealso" id="refsect1-zookeeper.setdeterministicconnorder-seealso"> <h3 class="title">See Also</h3> <ul class="simplelist"> <li class="member"><span class="methodname"><a href="zookeeper.construct.html" class="methodname" rel="rdfs-seeAlso">Zookeeper::__construct()</a> - Create a handle to used communicate with zookeeper</span></li> <li class="member"><span class="methodname"><a href="zookeeper.connect.html" class="methodname" rel="rdfs-seeAlso">Zookeeper::connect()</a> - Create a handle to used communicate with zookeeper</span></li> <li class="member"><strong class="classname">ZookeeperException</strong></li> </ul> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="zookeeper.setdebuglevel.html">Zookeeper::setDebugLevel</a></div> <div class="next" style="text-align: right; float: right;"><a href="zookeeper.setlogstream.html">Zookeeper::setLogStream</a></div> <div class="up"><a href="class.zookeeper.html">Zookeeper</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>