X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FAbstractThreePhaseCommitCohort.java;h=49b398f3fcd158b513b17b4acba34f05c9a2dcd0;hp=cac0f5135463f0772fdaf34c4f25297c22e8cf70;hb=118cd0216b0c6b0ec1a01689ec2025a13e090861;hpb=bcc66b3ee07a3bc18176418c4cd211596f49f2f0 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractThreePhaseCommitCohort.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractThreePhaseCommitCohort.java index cac0f51354..49b398f3fc 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractThreePhaseCommitCohort.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractThreePhaseCommitCohort.java @@ -7,9 +7,12 @@ */ package org.opendaylight.controller.cluster.datastore; -import akka.actor.ActorSelection; +import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.ListenableFuture; import java.util.List; -import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort; +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; /** @@ -17,6 +20,11 @@ import scala.concurrent.Future; * implementation. In addition to the usual set of methods it also contains the list of actor * futures. */ -abstract class AbstractThreePhaseCommitCohort implements DOMStoreThreePhaseCommitCohort { - abstract List> getCohortFutures(); +public abstract class AbstractThreePhaseCommitCohort implements DOMStoreThreePhaseCommitCohort { + protected static final @NonNull ListenableFuture IMMEDIATE_EMPTY_SUCCESS = + Futures.immediateFuture(Empty.value()); + protected static final @NonNull ListenableFuture IMMEDIATE_BOOLEAN_SUCCESS = + Futures.immediateFuture(Boolean.TRUE); + + abstract List> getCohortFutures(); }