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.opendaylight.mdsal.dom.spi.store.DOMStoreThreePhaseCommitCohort;
14 import scala.concurrent.Future;
17 * Abstract base class for {@link DOMStoreThreePhaseCommitCohort} instances returned by this
18 * implementation. In addition to the usual set of methods it also contains the list of actor
21 public abstract class AbstractThreePhaseCommitCohort<T> implements DOMStoreThreePhaseCommitCohort {
22 protected static final ListenableFuture<Void> IMMEDIATE_VOID_SUCCESS = Futures.immediateFuture(null);
23 protected static final ListenableFuture<Boolean> IMMEDIATE_BOOLEAN_SUCCESS = Futures.immediateFuture(Boolean.TRUE);
25 abstract List<Future<T>> getCohortFutures();