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;
    }
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;
    }
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 ; }
Pick new active node

Used when the currently active node fails to complete a command / query

@return $this
@throws Exception
Pick new active node