X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=benchmark%2Fdsbenchmark%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fdsbenchmark%2Ftxchain%2FTxchainBaWrite.java;h=b0ee4b4d2234c3cfd18bdfe7488e1f65e3a9cee7;hb=c8121ea6b5bf54c43777afe6a747be40637e1f42;hp=0a7ec6d22040246af278acc87dbf617e85da675b;hpb=793318ca32e9180614b68625eebb7dad902bf120;p=controller.git diff --git a/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/txchain/TxchainBaWrite.java b/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/txchain/TxchainBaWrite.java index 0a7ec6d220..b0ee4b4d22 100644 --- a/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/txchain/TxchainBaWrite.java +++ b/benchmark/dsbenchmark/src/main/java/org/opendaylight/dsbenchmark/txchain/TxchainBaWrite.java @@ -13,14 +13,13 @@ import java.util.List; import java.util.concurrent.ExecutionException; import org.opendaylight.dsbenchmark.BaListBuilder; import org.opendaylight.dsbenchmark.DatastoreAbstractWriter; -import org.opendaylight.mdsal.binding.api.BindingTransactionChain; import org.opendaylight.mdsal.binding.api.DataBroker; +import org.opendaylight.mdsal.binding.api.Transaction; +import org.opendaylight.mdsal.binding.api.TransactionChain; +import org.opendaylight.mdsal.binding.api.TransactionChainListener; import org.opendaylight.mdsal.binding.api.WriteTransaction; -import org.opendaylight.mdsal.common.api.AsyncTransaction; import org.opendaylight.mdsal.common.api.CommitInfo; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; -import org.opendaylight.mdsal.common.api.TransactionChain; -import org.opendaylight.mdsal.common.api.TransactionChainListener; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput.DataStore; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.dsbenchmark.rev150105.StartTestInput.Operation; @@ -36,7 +35,7 @@ public class TxchainBaWrite extends DatastoreAbstractWriter implements Transacti private List list; public TxchainBaWrite(final DataBroker bindingDataBroker, final Operation oper, - final int outerListElem, final int innerListElem, final long writesPerTx, final DataStore dataStore) { + final int outerListElem, final int innerListElem, final long writesPerTx, final DataStore dataStore) { super(oper, outerListElem, innerListElem, writesPerTx, dataStore); this.bindingDataBroker = bindingDataBroker; LOG.debug("Created TxchainBaWrite"); @@ -49,7 +48,7 @@ public class TxchainBaWrite extends DatastoreAbstractWriter implements Transacti @Override public void executeList() { - final BindingTransactionChain chain = bindingDataBroker.createTransactionChain(this); + final TransactionChain chain = bindingDataBroker.createMergingTransactionChain(this); final LogicalDatastoreType dsType = getDataStoreType(); WriteTransaction tx = chain.newWriteOnlyTransaction(); @@ -77,8 +76,8 @@ public class TxchainBaWrite extends DatastoreAbstractWriter implements Transacti } @Override - public void onFailure(final Throwable t) { - LOG.error("Transaction failed, {}", t); + public void onFailure(final Throwable cause) { + LOG.error("Transaction failed", cause); txError++; } }, MoreExecutors.directExecutor()); @@ -107,15 +106,14 @@ public class TxchainBaWrite extends DatastoreAbstractWriter implements Transacti } @Override - public void onTransactionChainFailed(final TransactionChain chain, - final AsyncTransaction transaction, final Throwable cause) { - LOG.error("Broken chain {} in DatastoreBaAbstractWrite, transaction {}, cause {}", - chain, transaction.getIdentifier(), cause); + public void onTransactionChainFailed(final TransactionChain chain, final Transaction transaction, + final Throwable cause) { + LOG.error("Broken chain {} in DatastoreBaAbstractWrite, transaction {}, cause {}", chain, + transaction.getIdentifier(), cause); } @Override - public void onTransactionChainSuccessful(final TransactionChain chain) { + public void onTransactionChainSuccessful(final TransactionChain chain) { LOG.debug("DatastoreBaAbstractWrite closed successfully, chain {}", chain); } - -} \ No newline at end of file +}