def METHOD_NAME(sched_name, class_name):
    k = (sched_name, class_name)
    try:
        rv = self.objectids[k]
    except KeyError:
        rv = self.objectids[k] = self.next_objectid
        self.next_objectid += 1
    return defer.succeed(rv)