2 * Copyright (c) 2014 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.md.sal.dom.broker.impl;
10 import com.google.common.util.concurrent.CheckedFuture;
11 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
12 import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
13 import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort;
16 * Executor of Three Phase Commit coordination for
17 * {@link DOMDataWriteTransaction} transactions.
19 * Implementations are responsible for executing implementation of three-phase
20 * commit protocol on supplied {@link DOMStoreThreePhaseCommitCohort}s.
24 public interface DOMDataCommitExecutor {
27 * Submits supplied transaction to be executed in context of provided
30 * Transaction is used only as a context, cohorts should be associated with
34 * Transaction to be used as context for reporting
36 * DOM Store cohorts representing provided transaction, its
38 * @return a CheckedFuture. if commit coordination on cohorts finished successfully,
39 * nothing is returned from the Future, On failure,
40 * the Future fails with a {@link TransactionCommitFailedException}.
43 CheckedFuture<Void,TransactionCommitFailedException> submit(DOMDataWriteTransaction tx,
44 Iterable<DOMStoreThreePhaseCommitCohort> cohort);