use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.programming.rev150720.InstructionsQueueBuilder in project bgpcep by opendaylight.
the class ProgrammingServiceImpl method instantiateServiceInstance.
@Override
public synchronized void instantiateServiceInstance() {
LOG.info("Instruction Queue service {} instantiated", this.sgi.getValue());
this.reg = this.rpcProviderRegistry.addRpcImplementation(ProgrammingService.class, this);
final WriteTransaction wt = this.dataProvider.newWriteOnlyTransaction();
wt.put(LogicalDatastoreType.OPERATIONAL, this.qid, new InstructionsQueueBuilder().setKey(new InstructionsQueueKey(this.instructionId)).setInstruction(Collections.emptyList()).build());
Futures.addCallback(wt.submit(), new FutureCallback<Void>() {
@Override
public void onSuccess(final Void result) {
LOG.debug("Instruction Queue {} added", ProgrammingServiceImpl.this.qid);
}
@Override
public void onFailure(final Throwable trw) {
LOG.error("Failed to add Instruction Queue {}", ProgrammingServiceImpl.this.qid, trw);
}
}, MoreExecutors.directExecutor());
}
Aggregations