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 com.google.common.util.concurrent.ListenableFuture;
11 import org.opendaylight.yangtools.concepts.Path;
14 * Three phase Commit Cohort for subtree, which is uniquely associated with user submitted transaction.
17 * Type of path (subtree identifier), which represents location in
20 * Type of data (payload), which represents data payload
22 @Deprecated(forRemoval = true)
23 public interface AsyncConfigurationCommitCohort<P extends Path<P>, D> {
26 * Initiates a pre-commit of associated request
29 * Implementation MUST NOT do any blocking calls during this callback, all
30 * pre-commit preparation SHOULD happen asynchronously and MUST result in
31 * completing returned future object.
33 * @param rebasedTransaction
34 * Read-only view of transaction as if happened on top of actual
36 * @return Future which is completed once pre-commit phase for this request
39 ListenableFuture<Void> preCommit(AsyncReadTransaction<P, D> rebasedTransaction);
42 * Initiates a commit phase of associated request
45 * Implementation MUST NOT do any blocking calls during this callback, all
46 * commit finalization SHOULD happen asynchronously and MUST result in
47 * completing returned future object.
49 * @return Future which is completed once commit phase for associated
50 * request is finished.
52 ListenableFuture<Void> commit();
55 * Initiates abort phase of associated request
58 * Implementation MUST NOT do any blocking calls during this callback, all
59 * commit finalization SHOULD happen asynchronously and MUST result in
60 * completing returned future object.
62 * @return Future which is completed once commit phase for associated
63 * request is finished.
65 ListenableFuture<Void> abort();