package org.opendaylight.dsbenchmark.simpletx;
+import java.util.concurrent.ExecutionException;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker;
import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
import org.opendaylight.dsbenchmark.DatastoreAbstractWriter;
final int innerListElem, final long writesPerTx, final DataStore dataStore) {
super(StartTestInput.Operation.DELETE, outerListElem, innerListElem, writesPerTx, dataStore);
this.domDataBroker = domDataBroker;
- LOG.info("Created simpleTxDomDelete");
+ LOG.debug("Created simpleTxDomDelete");
}
@Override
public void createList() {
- LOG.info("SimpletxDomDelete: creating data in the data store");
+ LOG.debug("SimpletxDomDelete: creating data in the data store");
// Dump the whole list into the data store in a single transaction
// with <outerListElem> PUTs on the transaction
SimpletxDomWrite dd = new SimpletxDomWrite(domDataBroker,
writeCnt++;
if (writeCnt == writesPerTx) {
try {
- tx.submit().checkedGet();
+ tx.commit().get();
txOk++;
- } catch (TransactionCommitFailedException e) {
+ } catch (final InterruptedException | ExecutionException e) {
LOG.error("Transaction failed: {}", e);
txError++;
}
}
if (writeCnt != 0) {
try {
- tx.submit().checkedGet();
- } catch (TransactionCommitFailedException e) {
+ tx.commit().get();
+ } catch (final InterruptedException | ExecutionException e) {
LOG.error("Transaction failed: {}", e);
}
}