Make neutron a simple osgi app
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / md / sal / dom / broker / impl / DOMDataCommitImplementation.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.md.sal.dom.broker.impl;
9
10 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
11 import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
12 import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort;
13 import com.google.common.util.concurrent.CheckedFuture;
14
15 /**
16  *
17  * Implementation prototype of commit method for
18  * {@link DOMForwardedWriteTransaction}.
19  *
20  */
21 public interface DOMDataCommitImplementation {
22
23     /**
24      * User-supplied implementation of {@link DOMDataWriteTransaction#submit()}
25      * for transaction.
26      *
27      * Callback invoked when {@link DOMDataWriteTransaction#submit()} is invoked
28      * on transaction created by this factory.
29      *
30      * @param transaction
31      *            Transaction on which {@link DOMDataWriteTransaction#commit()}
32      *            was invoked.
33      * @param cohorts
34      *            Iteration of cohorts for subtransactions associated with
35      *            commited transaction.
36      *
37      */
38     CheckedFuture<Void,TransactionCommitFailedException> submit(final DOMDataWriteTransaction transaction,
39             final Iterable<DOMStoreThreePhaseCommitCohort> cohorts);
40 }
41