Merge "- netconf SSH bridge bundle - Implement bridge using socket - standard netconf...
[controller.git] / opendaylight / md-sal / sal-common-api / src / main / java / org / opendaylight / controller / md / sal / common / api / data / DataModification.java
1 /*
2  * Copyright (c) 2013 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.controller.md.sal.common.api.data;
9
10 import java.util.Map;
11 import java.util.Set;
12 import java.util.concurrent.Future;
13
14 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
15 // FIXME: After 0.6 Release of YANGTools refactor to use Path marker interface for arguments.
16 // import org.opendaylight.yangtools.concepts.Path;
17 import org.opendaylight.yangtools.yang.common.RpcResult;
18
19 public interface DataModification<P/* extends Path<P> */, D> extends DataChange<P, D>, DataReader<P, D> {
20
21     /**
22      * Returns transaction identifier
23      * 
24      * @return Transaction identifier
25      */
26     Object getIdentifier();
27
28     TransactionStatus getStatus();
29
30     /**
31      * 
32      * @deprecated Use {@link #putOperationalData(Object, Object)} instead.
33      * 
34      * @param path
35      * @param data
36      */
37     @Deprecated
38     void putRuntimeData(P path, D data);
39
40     void putOperationalData(P path, D data);
41
42     void putConfigurationData(P path, D data);
43
44     /**
45      * @deprecated Use {@link #removeOperationalData(Object)}
46      * 
47      * @param path
48      */
49     @Deprecated
50     void removeRuntimeData(P path);
51
52     void removeOperationalData(P path);
53
54     void removeConfigurationData(P path);
55
56     /**
57      * Initiates a two-phase commit of modification.
58      * 
59      * <p>
60      * The successful commit changes the state of the system and may affect
61      * several components.
62      * 
63      * <p>
64      * The effects of successful commit of data are described in the
65      * specifications and YANG models describing the Provider components of
66      * controller. It is assumed that Consumer has an understanding of this
67      * changes.
68      * 
69      * 
70      * @see DataCommitHandler for further information how two-phase commit is
71      *      processed.
72      * @param store
73      *            Identifier of the store, where commit should occur.
74      * @return Result of the Commit, containing success information or list of
75      *         encountered errors, if commit was not successful. The Future
76      *         blocks until {@link TransactionStatus#COMMITED} or
77      *         {@link TransactionStatus#FAILED} is reached.
78      */
79     Future<RpcResult<TransactionStatus>> commit();
80
81 }