/** * Save last scroll id and extract the new one if possible * @param ResultSet $resultSet */ protected function _setScrollId(ResultSet $resultSet) { $this->_lastScrollId = $this->_nextScrollId; $this->_nextScrollId = null; if ($resultSet->getResponse()->isOk()) { $this->_nextScrollId = $resultSet->getResponse()->getScrollId(); } }