NormalizedNodeAggregator should also report empty
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / LocalThreePhaseCommitCohort.java
index ac279b7e995aee715b6e050c3c1bce043cfcf16c..091bfa01e4db0346b85fbb432ddace51e7e8857c 100644 (file)
@@ -19,9 +19,11 @@ import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier
 import org.opendaylight.controller.cluster.datastore.messages.CommitTransactionReply;
 import org.opendaylight.controller.cluster.datastore.messages.ReadyLocalTransaction;
 import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
+import org.opendaylight.mdsal.common.api.CommitInfo;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreThreePhaseCommitCohort;
 import org.opendaylight.mdsal.dom.spi.store.SnapshotBackedWriteTransaction;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
+import org.opendaylight.yangtools.yang.common.Empty;
+import org.opendaylight.yangtools.yang.data.tree.api.DataTreeModification;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import scala.concurrent.Future;
@@ -59,7 +61,7 @@ class LocalThreePhaseCommitCohort implements DOMStoreThreePhaseCommitCohort {
         this.leader = requireNonNull(leader);
         this.transaction = requireNonNull(transaction);
         this.operationError = requireNonNull(operationError);
-        this.modification = null;
+        modification = null;
     }
 
     private Future<Object> initiateCommit(final boolean immediate,
@@ -95,7 +97,7 @@ class LocalThreePhaseCommitCohort implements DOMStoreThreePhaseCommitCohort {
 
     Future<Object> initiateDirectCommit() {
         final Future<Object> messageFuture = initiateCommit(true, Optional.empty());
-        messageFuture.onComplete(new OnComplete<Object>() {
+        messageFuture.onComplete(new OnComplete<>() {
             @Override
             public void onComplete(final Throwable failure, final Object message) {
                 if (failure != null) {
@@ -122,19 +124,19 @@ class LocalThreePhaseCommitCohort implements DOMStoreThreePhaseCommitCohort {
     }
 
     @Override
-    public final ListenableFuture<Void> preCommit() {
+    public final ListenableFuture<Empty> preCommit() {
         // Intended no-op
         throw new UnsupportedOperationException();
     }
 
     @Override
-    public final ListenableFuture<Void> abort() {
+    public final ListenableFuture<Empty> abort() {
         // Intended no-op
         throw new UnsupportedOperationException();
     }
 
     @Override
-    public final ListenableFuture<Void> commit() {
+    public final ListenableFuture<CommitInfo> commit() {
         // Intended no-op
         throw new UnsupportedOperationException();
     }