Deprecate all MD-SAL APIs
[controller.git] / opendaylight / md-sal / sal-dom-spi / src / main / java / org / opendaylight / controller / sal / core / spi / data / DOMStoreWriteTransaction.java
1 /*
2  * Copyright (c) 2014 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.sal.core.spi.data;
9
10 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
11 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
12
13 @Deprecated
14 public interface DOMStoreWriteTransaction extends DOMStoreTransaction {
15
16     /**
17      * Store a provided data at specified path. This acts as a add / replace
18      * operation, which is to say that whole subtree will be replaced by
19      * specified path.
20      *
21      * <p>
22      * If you need add or merge of current object with specified use
23      * {@link #merge(YangInstanceIdentifier, NormalizedNode)}.
24      *
25      * @param path the path to write
26      * @param data data object to be written
27      * @throws IllegalStateException
28      *             if the client code already sealed transaction and invoked
29      *             {@link #ready()}
30      */
31     void write(YangInstanceIdentifier path, NormalizedNode<?, ?> data);
32
33     /**
34      * Store a provided data at specified path. This acts as a add / replace
35      * operation, which is to say that whole subtree will be replaced by
36      * specified path.
37      *
38      * @param path the path to write
39      * @param data data object to be written
40      * @throws IllegalStateException
41      *             if the client code already sealed transaction and invoked
42      *             {@link #ready()}
43      */
44     void merge(YangInstanceIdentifier path, NormalizedNode<?, ?> data);
45
46     /**
47      * Deletes data and whole subtree located at provided path.
48      *
49      * @param path path to delete
50      * @throws IllegalStateException
51      *             if the client code already sealed transaction and invoked
52      *             {@link #ready()}
53      */
54     void delete(YangInstanceIdentifier path);
55
56     /**
57      * Seals transaction, and returns three-phase commit cohort associated
58      * with this transaction and DOM Store to be coordinated by coordinator.
59      *
60      * @return Three Phase Commit Cohort instance for this transaction.
61      */
62     DOMStoreThreePhaseCommitCohort ready();
63
64 }