Class ProgrammingServiceImpl
- java.lang.Object
-
- org.opendaylight.bgpcep.programming.impl.ProgrammingServiceImpl
-
- All Implemented Interfaces:
AutoCloseable,InstructionScheduler,org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService,ProgrammingService,org.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier>,org.opendaylight.yangtools.yang.binding.RpcService
public final class ProgrammingServiceImpl extends Object implements org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService, InstructionScheduler, ProgrammingService
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<CancelInstructionOutput>>cancelInstruction(CancelInstructionInput input)com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<CleanInstructionsOutput>>cleanInstructions(CleanInstructionsInput input)Attempt to clean out a certain set of instructions.voidclose()com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo>closeServiceInstance()org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifiergetIdentifier()StringgetInstructionID()Returns InstructionID.voidinstantiateServiceInstance()com.google.common.util.concurrent.ListenableFuture<Instruction>scheduleInstruction(SubmitInstructionInput input)Schedule a new instruction for execution.
-
-
-
Method Detail
-
instantiateServiceInstance
public void instantiateServiceInstance()
- Specified by:
instantiateServiceInstancein interfaceorg.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
-
getIdentifier
public org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier getIdentifier()
- Specified by:
getIdentifierin interfaceorg.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier>
-
cancelInstruction
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<CancelInstructionOutput>> cancelInstruction(CancelInstructionInput input)
- Specified by:
cancelInstructionin interfaceProgrammingService
-
cleanInstructions
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<CleanInstructionsOutput>> cleanInstructions(CleanInstructionsInput input)
Description copied from interface:ProgrammingServiceAttempt to clean out a certain set of instructions. Instructions flushed this way need to be in a terminal state, e.g. Successful, Failed or Cancelled. Instructions which were not cleaned are reported in the output of this RPC.- Specified by:
cleanInstructionsin interfaceProgrammingService
-
scheduleInstruction
public com.google.common.util.concurrent.ListenableFuture<Instruction> scheduleInstruction(SubmitInstructionInput input) throws SchedulerException
Description copied from interface:InstructionSchedulerSchedule a new instruction for execution. This method tries to enqueue an instruction. It will return a Future which represents the scheduling progress. When the future becomes successful, the requestor is expected to start executing on the instruction, as specified by theInstructioncontract.- Specified by:
scheduleInstructionin interfaceInstructionScheduler- Parameters:
input- Instruction scheduling information- Returns:
- Scheduling future.
- Throws:
SchedulerException- if a failure to schedule the instruction occurs.
-
getInstructionID
public String getInstructionID()
Description copied from interface:InstructionSchedulerReturns InstructionID.- Specified by:
getInstructionIDin interfaceInstructionScheduler- Returns:
- Instruction ID
-
closeServiceInstance
public com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo> closeServiceInstance()
- Specified by:
closeServiceInstancein interfaceorg.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable
-
-