Basho\Riak::pickNewNode PHP Method

pickNewNode() public method

Used when the currently active node fails to complete a command / query
public pickNewNode ( )
    public function pickNewNode()
    {
        // mark current active node as inactive and increment attempts
        $this->getActiveNode()->setInactive(true);
        $this->attempts++;
        $this->inactiveNodes[$this->getActiveNodeIndex()] = $this->getActiveNode();
        // move active node to inactive nodes structure to prevent selecting again
        unset($this->nodes[$this->getActiveNodeIndex()]);
        $this->setActiveNodeIndex($this->pickNode());
        return $this;
    }