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.common.api.data;
10 import org.opendaylight.yangtools.concepts.ObjectRegistration;
11 import org.opendaylight.yangtools.concepts.Path;
14 * Three Phase Commit Coordinator with support of user-supplied commit cohorts
15 * which participates in three-phase commit protocols.
18 * Type of path (subtree identifier), which represents location in
21 * Type of data (payload), which represents data payload
24 public interface AsyncConfigurationCommitCoordinator<P extends Path<P>, D> {
27 * Register configuration commit handler for particular subtree.
29 * Configuration commit handler is invoked for all write transactions
30 * which modifies <code>subtree</code>
32 * @param subtree Subtree which configuration commit handler is interested it
33 * @param commitHandler Instance of user-provided commit handler
34 * @return Registration object representing this registration. Invoking {@link ObjectRegistration#close()}
35 * will unregister configuration commit handler.
37 <C extends AsyncConfigurationCommitCohort<P, D>> ObjectRegistration<C> registerConfigurationCommitHandler(
38 P subtree, C commitHandler);