'Refreshes the cursor with more data from the server.
Returns the length of self.__data after refresh. Will exit early if
self.__data is already non-empty. Raises OperationFailure when the
cursor cannot be refreshed due to an error on the query.'

def _refresh(self):

    if (len(self.__data) or self.__killed):
        return len(self.__data)
    if self.__id:
        (dbname, collname) = self.__ns.split('.', 1)
        self.__send_message(_GetMore(dbname, collname, self.__batch_size, self.__id, self.__collection.codec_options))
    else:
        self.__killed = True
    return len(self.__data)
