Use Empty instead of Void in cohorts
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / AbstractThreePhaseCommitCohort.java
index 7ef1cd49851ef838361c509e3f8af60020de644b..49b398f3fcd158b513b17b4acba34f05c9a2dcd0 100644 (file)
@@ -10,7 +10,9 @@ package org.opendaylight.controller.cluster.datastore;
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 import java.util.List;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreThreePhaseCommitCohort;
+import org.opendaylight.yangtools.yang.common.Empty;
 import scala.concurrent.Future;
 
 /**
@@ -19,8 +21,10 @@ import scala.concurrent.Future;
  * futures.
  */
 public abstract class AbstractThreePhaseCommitCohort<T> implements DOMStoreThreePhaseCommitCohort {
-    protected static final ListenableFuture<Void> IMMEDIATE_VOID_SUCCESS = Futures.immediateFuture(null);
-    protected static final ListenableFuture<Boolean> IMMEDIATE_BOOLEAN_SUCCESS = Futures.immediateFuture(Boolean.TRUE);
+    protected static final @NonNull ListenableFuture<Empty> IMMEDIATE_EMPTY_SUCCESS =
+        Futures.immediateFuture(Empty.value());
+    protected static final @NonNull ListenableFuture<Boolean> IMMEDIATE_BOOLEAN_SUCCESS =
+        Futures.immediateFuture(Boolean.TRUE);
 
     abstract List<Future<T>> getCohortFutures();
 }