2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.bgpcep.programming.spi;
10 import com.google.common.util.concurrent.ListenableFuture;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.programming.rev130930.SubmitInstructionInput;
14 public interface InstructionScheduler {
16 * Schedule a new instruction for execution. This method tries to enqueue an instruction. It will return a Future
17 * which represents the scheduling progress. When the future becomes successful, the requestor is expected to start
18 * executing on the instruction, as specified by the {@link Instruction} contract.
20 * @param input Instruction scheduling information
21 * @return Scheduling future.
23 * @throws SchedulerException if a failure to schedule the instruction occurs.
25 ListenableFuture<Instruction> scheduleInstruction(SubmitInstructionInput input) throws SchedulerException;