Elastica\Node\Stats::refresh PHP Method

refresh() public method

Reloads all nodes information. Has to be called if informations changed.
public refresh ( ) : Response
return Elastica\Response Response object
    public function refresh()
    {
        $path = '_nodes/' . $this->getNode()->getName() . '/stats';
        $this->_response = $this->getNode()->getClient()->request($path, Request::GET);
        $data = $this->getResponse()->getData();
        $this->_data = reset($data['nodes']);
    }