X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FNoOpDOMStoreThreePhaseCommitCohort.java;fp=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FNoOpDOMStoreThreePhaseCommitCohort.java;h=0000000000000000000000000000000000000000;hb=736333d81f3033ad3a78a7bcadc27b9256396706;hp=9b477320e56df40136c6f6c47cee76c8700bea5c;hpb=3d0b84870481f03e4187bfbb7da89ff23e37516b;p=controller.git 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 deleted file mode 100644 index 9b477320e5..0000000000 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/NoOpDOMStoreThreePhaseCommitCohort.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.cluster.datastore; - -import com.google.common.util.concurrent.ListenableFuture; -import java.util.Collections; -import java.util.List; -import org.opendaylight.mdsal.common.api.CommitInfo; -import org.opendaylight.yangtools.yang.common.Empty; -import scala.concurrent.Future; - -/** - * A {@link org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort} - * instance given out for empty transactions. - */ -final class NoOpDOMStoreThreePhaseCommitCohort extends AbstractThreePhaseCommitCohort { - static final NoOpDOMStoreThreePhaseCommitCohort INSTANCE = new NoOpDOMStoreThreePhaseCommitCohort(); - - private NoOpDOMStoreThreePhaseCommitCohort() { - // Hidden to prevent instantiation - } - - @Override - public ListenableFuture canCommit() { - return IMMEDIATE_BOOLEAN_SUCCESS; - } - - @Override - public ListenableFuture preCommit() { - return IMMEDIATE_EMPTY_SUCCESS; - } - - @Override - public ListenableFuture abort() { - return IMMEDIATE_EMPTY_SUCCESS; - } - - @Override - public ListenableFuture commit() { - return CommitInfo.emptyFluentFuture(); - } - - @Override - List> getCohortFutures() { - return Collections.emptyList(); - } -}