90f925183850124206974060b22d20db9eac6f1f
[mdsal.git] / dom / mdsal-dom-api / src / main / java / org / opendaylight / mdsal / dom / api / DOMDataTreeCommitCohortRegistry.java
1 /*
2  * Copyright (c) 2015 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.mdsal.dom.api;
9
10 import org.eclipse.jdt.annotation.NonNullByDefault;
11 import org.opendaylight.yangtools.concepts.Registration;
12
13 /**
14  * Commit Cohort registry for {@link DOMDataTreeWriteTransaction}. See {@link DOMDataTreeCommitCohort} for more details.
15  */
16 @NonNullByDefault
17 public interface DOMDataTreeCommitCohortRegistry extends DOMDataBroker.Extension {
18     /**
19      * Register commit cohort which will participate in three-phase commit protocols of
20      * {@link DOMDataTreeWriteTransaction} in data broker associated with this instance of extension.
21      *
22      * @param path Subtree path on which commit cohort operates.
23      * @param cohort Commit cohort
24      * @return A {@link Registration}
25      * @throws NullPointerException if any argument is {@code null}
26      */
27     Registration registerCommitCohort(DOMDataTreeIdentifier path, DOMDataTreeCommitCohort cohort);
28 }