ec30a938e78ac931669e583ce73966063758fd74
[mdsal.git] / binding / mdsal-binding-api / src / main / java / org / opendaylight / mdsal / binding / api / DataTreeCommitCohortRegistry.java
1 /*
2  * Copyright (c) 2016 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
9 package org.opendaylight.mdsal.binding.api;
10
11 import org.opendaylight.yangtools.concepts.ObjectRegistration;
12 import org.opendaylight.yangtools.yang.binding.DataObject;
13
14 /**
15  * Commit Cohort registry.
16  *
17  * <p>
18  * See {@link DataTreeCommitCohort} for more details.
19  *
20  * @author Tony Tkacik &lt;ttkacik@cisco.com&gt;
21  *
22  */
23 public interface DataTreeCommitCohortRegistry {
24
25     /**
26      * Register commit cohort which will participate in three-phase commit protocols of write
27      * transaction in data broker associated with this instance of extension.
28      *
29      * @param subtree Subtree path on which commit cohort operates.
30      * @param cohort Commit cohort
31      * @return Registaration object for DOM Data Three Commit cohort.
32      */
33     <D extends DataObject, T extends DataTreeCommitCohort<D>> ObjectRegistration<T> registerCommitCohort(
34             DataTreeIdentifier<D> subtree, T cohort);
35
36 }