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
23 public interface AsyncConfigurationCommitCoordinator<P extends Path<P>, D> {
26 * Register configuration commit handler for particular subtree
28 * Configuration commit handler is invoked for all write transactions
29 * which modifies <code>subtree</code>
31 * @param subtree Subtree which configuration commit handler is interested it
32 * @param commitHandler Instance of user-provided commit handler
33 * @return Registration object representing this registration. Invoking {@link ObjectRegistration#close()}
34 * will unregister configuration commit handler.
36 <C extends AsyncConfigurationCommitCohort<P, D>> ObjectRegistration<C> registerConfigurationCommitHandler(
37 P subtree, C commitHandler);