@Override
public void invoke(TransactCommand command, BridgeOperationalState state,
AsyncDataChangeEvent<InstanceIdentifier<?>, DataObject> events) {
- TransactionBuilder tb = new TransactionBuilder(connectionInstance, dbSchema);
+ TransactionBuilder tb = new TransactionBuilder(connectionInstance.getOvsdbClient(), dbSchema);
command.execute(tb, state, events);
invoke(command, tb);
}
@Override
public void invoke(TransactCommand command, BridgeOperationalState state,
Collection<DataTreeModification<Node>> modifications) {
- TransactionBuilder tb = new TransactionBuilder(connectionInstance, dbSchema);
+ TransactionBuilder tb = new TransactionBuilder(connectionInstance.getOvsdbClient(), dbSchema);
command.execute(tb, state, modifications);
invoke(command, tb);
}
LOG.debug("invoke: command: {}, tb: {}", command, tb);
if (tb.getOperations().size() > 0) {
try {
- List<OperationResult> got = result.get();
- LOG.debug("OVSDB transaction result: {}", got);
+ if (!result.isCancelled()) {
+ List<OperationResult> got = result.get();
+ LOG.debug("OVSDB transaction result: {}", got);
+ } else {
+ LOG.debug("Operation task cancelled for transaction : {}", tb);
+ }
} catch (InterruptedException | ExecutionException e) {
LOG.warn("Transact execution exception: ", e);
}
LOG.trace("invoke exit command: {}, tb: {}", command, tb);
}
}
-
}