2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.cluster.datastore;
10 import com.google.common.util.concurrent.Futures;
11 import com.google.common.util.concurrent.ListenableFuture;
12 import java.util.List;
13 import org.eclipse.jdt.annotation.NonNull;
14 import org.opendaylight.mdsal.dom.spi.store.DOMStoreThreePhaseCommitCohort;
15 import org.opendaylight.yangtools.yang.common.Empty;
16 import scala.concurrent.Future;
19 * Abstract base class for {@link DOMStoreThreePhaseCommitCohort} instances returned by this
20 * implementation. In addition to the usual set of methods it also contains the list of actor
23 public abstract class AbstractThreePhaseCommitCohort<T> implements DOMStoreThreePhaseCommitCohort {
24 protected static final @NonNull ListenableFuture<Empty> IMMEDIATE_EMPTY_SUCCESS =
25 Futures.immediateFuture(Empty.value());
26 protected static final @NonNull ListenableFuture<Boolean> IMMEDIATE_BOOLEAN_SUCCESS =
27 Futures.immediateFuture(Boolean.TRUE);
29 abstract List<Future<T>> getCohortFutures();