'Returns the maximum stream id such that all stream ids less than or
equal to it have been successfully persisted.'

def get_current_token(self):

    with self._lock:
        if self._unfinished_ids:
            (stream_id, chained_id) = self._unfinished_ids[0]
            return ((stream_id - 1), chained_id)
        return (self._current_max, self.chained_generator.get_current_token())
