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%2FNoOpDOMStoreThreePhaseCommitCohort.java;h=1f5f5bcf79351764eb7776634a950f59077f63dc;hp=766cf1d578c5eab63fb8f8a59a3ebdbd3c4a0380;hb=925cb4a228d0fda99c7bfeb432eb25285a223887;hpb=88158983519dc4e3ed2da18e945ae0f99039fbb4 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/NoOpDOMStoreThreePhaseCommitCohort.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/NoOpDOMStoreThreePhaseCommitCohort.java index 766cf1d578..1f5f5bcf79 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/NoOpDOMStoreThreePhaseCommitCohort.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/NoOpDOMStoreThreePhaseCommitCohort.java @@ -7,19 +7,18 @@ */ package org.opendaylight.controller.cluster.datastore; -import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; -import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort; +import java.util.Collections; +import java.util.List; +import scala.concurrent.Future; /** - * A {@link DOMStoreThreePhaseCommitCohort} instance given out for empty transactions. + * A {@link org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort} + * instance given out for empty transactions. */ -final class NoOpDOMStoreThreePhaseCommitCohort implements DOMStoreThreePhaseCommitCohort { +final class NoOpDOMStoreThreePhaseCommitCohort extends AbstractThreePhaseCommitCohort { static final NoOpDOMStoreThreePhaseCommitCohort INSTANCE = new NoOpDOMStoreThreePhaseCommitCohort(); - private static final ListenableFuture IMMEDIATE_VOID_SUCCESS = Futures.immediateFuture(null); - private static final ListenableFuture IMMEDIATE_BOOLEAN_SUCCESS = Futures.immediateFuture(Boolean.TRUE); - private NoOpDOMStoreThreePhaseCommitCohort() { // Hidden to prevent instantiation } @@ -43,4 +42,9 @@ final class NoOpDOMStoreThreePhaseCommitCohort implements DOMStoreThreePhaseComm public ListenableFuture commit() { return IMMEDIATE_VOID_SUCCESS; } -} \ No newline at end of file + + @Override + List> getCohortFutures() { + return Collections.emptyList(); + } +}