import com.google.common.util.concurrent.ListenableFuture;
public class TransactInvokerImpl implements TransactInvoker {
- private static final Logger LOG = LoggerFactory.getLogger(BridgeCreateCommand.class);
+ private static final Logger LOG = LoggerFactory.getLogger(BridgeUpdateCommand.class);
private OvsdbConnectionInstance connectionInstance;
private DatabaseSchema dbSchema;
public TransactInvokerImpl(OvsdbConnectionInstance connectionInstance, DatabaseSchema dbSchema) {
- this.connectionInstance =connectionInstance;
+ this.connectionInstance = connectionInstance;
this.dbSchema = dbSchema;
}
TransactionBuilder tb = new TransactionBuilder(connectionInstance, dbSchema);
command.execute(tb);
ListenableFuture<List<OperationResult>> result = tb.execute();
- try {
- List<OperationResult> got = result.get();
- LOG.debug("Results of create bridge request",got);
- } catch (Exception e){
- LOG.warn("Transact execution exception: ",e);
+ LOG.debug("invoke: command: {}, tb: {}", command, tb);
+ if (tb.getOperations().size() > 0) {
+ try {
+ List<OperationResult> got = result.get();
+ LOG.debug("OVSDB transaction result: {}", got);
+ } catch (Exception e) {
+ LOG.warn("Transact execution exception: ", e);
+ }
+ LOG.trace("invoke exit command: {}, tb: {}", command, tb);
}
}