code: def rotate(self):
          
          self._logger.info('Rotating data files. New batch number will be: %s',
                            self.batchno + 1)
          self.estore.close()
          self.estore = None
          self.batchno += 1
          self.estore = self._open_event_store()
docs: Rotate the files to disk.
  
          This is done by calling `store.close()` on each store, bumping the
          batchno and reopening the stores using their factories.