X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=restconf%2Frestconf-nb-rfc8040%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Frestconf%2Fnb%2Frfc8040%2Fhandlers%2FTransactionChainHandler.java;h=7c2440bc3f4666b81f4c4bd527e076cd17cff554;hb=b7537d2482ffb05582749ce80a7ca44c64a5ad6c;hp=4acea3aad78032369a5ff4fed20ac5f156f05ca9;hpb=e0348041c1759f520f1f2993cc139647a41fb29e;p=netconf.git diff --git a/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/handlers/TransactionChainHandler.java b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/handlers/TransactionChainHandler.java index 4acea3aad7..7c2440bc3f 100644 --- a/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/handlers/TransactionChainHandler.java +++ b/restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/handlers/TransactionChainHandler.java @@ -5,21 +5,17 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - package org.opendaylight.restconf.nb.rfc8040.handlers; import java.util.Objects; -import javax.annotation.Nullable; -import org.opendaylight.controller.md.sal.common.api.data.AsyncTransaction; -import org.opendaylight.controller.md.sal.common.api.data.TransactionChain; -import org.opendaylight.controller.md.sal.common.api.data.TransactionChainListener; -import org.opendaylight.controller.md.sal.dom.api.DOMDataBroker; -import org.opendaylight.controller.md.sal.dom.api.DOMTransactionChain; +import org.opendaylight.mdsal.dom.api.DOMDataBroker; +import org.opendaylight.mdsal.dom.api.DOMDataTreeTransaction; +import org.opendaylight.mdsal.dom.api.DOMTransactionChain; +import org.opendaylight.mdsal.dom.api.DOMTransactionChainListener; import org.opendaylight.restconf.common.errors.RestconfDocumentedException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - /** * Implementation of {@link TransactionChainHandler}. * @@ -27,23 +23,23 @@ import org.slf4j.LoggerFactory; public class TransactionChainHandler implements Handler, AutoCloseable { private static final Logger LOG = LoggerFactory.getLogger(TransactionChainHandler.class); - private final TransactionChainListener transactionChainListener = new TransactionChainListener() { + private final DOMTransactionChainListener transactionChainListener = new DOMTransactionChainListener() { @Override - public void onTransactionChainFailed(final TransactionChain chain, - final AsyncTransaction transaction, final Throwable cause) { + public void onTransactionChainFailed(final DOMTransactionChain chain, final DOMDataTreeTransaction transaction, + final Throwable cause) { LOG.warn("TransactionChain({}) {} FAILED!", chain, transaction.getIdentifier(), cause); reset(); throw new RestconfDocumentedException("TransactionChain(" + chain + ") not committed correctly", cause); } @Override - public void onTransactionChainSuccessful(final TransactionChain chain) { + public void onTransactionChainSuccessful(final DOMTransactionChain chain) { LOG.trace("TransactionChain({}) SUCCESSFUL", chain); } }; - @Nullable private final DOMDataBroker dataBroker; + private volatile DOMTransactionChain transactionChain; /**