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.void
close()
com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo>
closeServiceInstance()
org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier
getIdentifier()
String
getInstructionID()
Returns InstructionID.void
instantiateServiceInstance()
com.google.common.util.concurrent.ListenableFuture<Instruction>
scheduleInstruction(SubmitInstructionInput input)
Schedule a new instruction for execution.
-
-
-
Method Detail
-
instantiateServiceInstance
public void instantiateServiceInstance()
- Specified by:
instantiateServiceInstance
in interfaceorg.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
-
getIdentifier
public org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier getIdentifier()
- Specified by:
getIdentifier
in 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:
cancelInstruction
in interfaceProgrammingService
-
cleanInstructions
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<CleanInstructionsOutput>> cleanInstructions(CleanInstructionsInput input)
Description copied from interface:ProgrammingService
Attempt 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:
cleanInstructions
in interfaceProgrammingService
-
scheduleInstruction
public com.google.common.util.concurrent.ListenableFuture<Instruction> scheduleInstruction(SubmitInstructionInput input) throws SchedulerException
Description copied from interface:InstructionScheduler
Schedule 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 theInstruction
contract.- Specified by:
scheduleInstruction
in 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:InstructionScheduler
Returns InstructionID.- Specified by:
getInstructionID
in interfaceInstructionScheduler
- Returns:
- Instruction ID
-
closeServiceInstance
public com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo> closeServiceInstance()
- Specified by:
closeServiceInstance
in interfaceorg.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
-