Refactor TransactionProxy
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / TransactionContext.java
index b6af31e..1b8e65e 100644 (file)
@@ -9,9 +9,8 @@ package org.opendaylight.controller.cluster.datastore;
 
 import akka.actor.ActorSelection;
 import com.google.common.base.Optional;
 
 import akka.actor.ActorSelection;
 import com.google.common.base.Optional;
-import com.google.common.util.concurrent.CheckedFuture;
+import com.google.common.util.concurrent.SettableFuture;
 import java.util.List;
 import java.util.List;
-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 scala.concurrent.Future;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import scala.concurrent.Future;
@@ -31,10 +30,9 @@ interface TransactionContext {
 
     void mergeData(YangInstanceIdentifier path, NormalizedNode<?, ?> data);
 
 
     void mergeData(YangInstanceIdentifier path, NormalizedNode<?, ?> data);
 
-    CheckedFuture<Optional<NormalizedNode<?, ?>>, ReadFailedException> readData(
-            final YangInstanceIdentifier path);
+    void readData(final YangInstanceIdentifier path, SettableFuture<Optional<NormalizedNode<?, ?>>> proxyFuture);
 
 
-    CheckedFuture<Boolean, ReadFailedException> dataExists(YangInstanceIdentifier path);
+    void dataExists(YangInstanceIdentifier path, SettableFuture<Boolean> proxyFuture);
 
     List<Future<Object>> getRecordedOperationFutures();
 
     List<Future<Object>> getRecordedOperationFutures();
-}
\ No newline at end of file
+}