X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FNoOpTransactionContext.java;h=fa9d97a1fddbed8bb7d5100a8c6ddb9779cf0365;hb=d5bd70b3350fa21bb007e0ad9492d8cc6475ac98;hp=2094cd2f77ff1a8399f88ce0bb4247603c484cb3;hpb=4379f102fa0c85abf58f60d81fec9c698582fb1a;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/NoOpTransactionContext.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/NoOpTransactionContext.java index 2094cd2f77..fa9d97a1fd 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/NoOpTransactionContext.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/NoOpTransactionContext.java @@ -8,14 +8,13 @@ package org.opendaylight.controller.cluster.datastore; import akka.actor.ActorSelection; -import com.google.common.base.Optional; import com.google.common.util.concurrent.SettableFuture; import org.opendaylight.controller.cluster.datastore.exceptions.NoShardLeaderException; import org.opendaylight.controller.cluster.datastore.identifiers.TransactionIdentifier; +import org.opendaylight.controller.cluster.datastore.messages.AbstractRead; +import org.opendaylight.controller.cluster.datastore.modification.AbstractModification; import org.opendaylight.controller.md.sal.common.api.data.DataStoreUnavailableException; import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException; -import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import scala.concurrent.Future; @@ -53,23 +52,15 @@ final class NoOpTransactionContext extends AbstractTransactionContext { } @Override - public void deleteData(YangInstanceIdentifier path) { - LOG.debug("Tx {} deleteData called path = {}", getIdentifier(), path); + public void executeModification(AbstractModification modification) { + LOG.debug("Tx {} executeModification {} called path = {}", getIdentifier(), modification.getClass().getSimpleName(), + modification.getPath()); } @Override - public void mergeData(YangInstanceIdentifier path, NormalizedNode data) { - LOG.debug("Tx {} mergeData called path = {}", getIdentifier(), path); - } - - @Override - public void writeData(YangInstanceIdentifier path, NormalizedNode data) { - LOG.debug("Tx {} writeData called path = {}", getIdentifier(), path); - } - - @Override - public void readData(final YangInstanceIdentifier path, SettableFuture>> proxyFuture) { - LOG.debug("Tx {} readData called path = {}", getIdentifier(), path); + public void executeRead(AbstractRead readCmd, SettableFuture proxyFuture) { + LOG.debug("Tx {} executeRead {} called path = {}", getIdentifier(), readCmd.getClass().getSimpleName(), + readCmd.getPath()); final Throwable t; if (failure instanceof NoShardLeaderException) { @@ -77,12 +68,7 @@ final class NoOpTransactionContext extends AbstractTransactionContext { } else { t = failure; } - proxyFuture.setException(new ReadFailedException("Error reading data for path " + path, t)); - } - - @Override - public void dataExists(YangInstanceIdentifier path, SettableFuture proxyFuture) { - LOG.debug("Tx {} dataExists called path = {}", getIdentifier(), path); - proxyFuture.setException(new ReadFailedException("Error checking exists for path " + path, failure)); + proxyFuture.setException(new ReadFailedException("Error executeRead " + readCmd.getClass().getSimpleName() + + " for path " + readCmd.getPath(), t)); } }