Fix typo in match types yang model
[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     /**
41      * Store a piece of data at specified path. This acts as a merge operation,
42      * which is to say that any pre-existing data which is not explicitly
43      * overwritten will be preserved. This means that if you store a container,
44      * its child lists will be merged. Performing the following put operations:
45      *
46      * 1) container { list [ a ] }
47      * 2) container { list [ b ] }
48      *
49      * will result in the following data being present:
50      *
51      * container { list [ a, b ] }
52      *
53      * This also means that storing the container will preserve any augmentations
54      * which have been attached to it.
55      *
56      * If you require an explicit replace operation, perform
57      * {@link removeOperationalData} first.
58      */
59     void putOperationalData(P path, D data);
60
61     /**
62      * Store a piece of data at specified path. This acts as a merge operation,
63      * which is to say that any pre-existing data which is not explicitly
64      * overwritten will be preserved. This means that if you store a container,
65      * its child lists will be merged. Performing the following put operations:
66      *
67      * 1) container { list [ a ] }
68      * 2) container { list [ b ] }
69      *
70      * will result in the following data being present:
71      *
72      * container { list [ a, b ] }
73      *
74      * This also means that storing the container will preserve any augmentations
75      * which have been attached to it.
76      *
77      * If you require an explicit replace operation, perform
78      * {@link removeConfigurationData} first.
79      */
80     void putConfigurationData(P path, D data);
81
82     /**
83      * @deprecated Use {@link #removeOperationalData(Object)}
84      * 
85      * @param path
86      */
87     @Deprecated
88     void removeRuntimeData(P path);
89
90     void removeOperationalData(P path);
91
92     void removeConfigurationData(P path);
93
94     /**
95      * Initiates a two-phase commit of modification.
96      * 
97      * <p>
98      * The successful commit changes the state of the system and may affect
99      * several components.
100      * 
101      * <p>
102      * The effects of successful commit of data are described in the
103      * specifications and YANG models describing the Provider components of
104      * controller. It is assumed that Consumer has an understanding of this
105      * changes.
106      * 
107      * 
108      * @see DataCommitHandler for further information how two-phase commit is
109      *      processed.
110      * @param store
111      *            Identifier of the store, where commit should occur.
112      * @return Result of the Commit, containing success information or list of
113      *         encountered errors, if commit was not successful. The Future
114      *         blocks until {@link TransactionStatus#COMMITED} or
115      *         {@link TransactionStatus#FAILED} is reached.
116      */
117     Future<RpcResult<TransactionStatus>> commit();
118
119 }