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