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.mdsal.dom.spi.store;
10 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
11 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
13 public interface DOMStoreWriteTransaction extends DOMStoreTransaction {
16 * Store a provided data at specified path. This acts as a add / replace operation, which is to
17 * say that whole subtree will be replaced by specified path.
19 * If you need add or merge of current object with specified use
20 * {@link #merge(YangInstanceIdentifier, NormalizedNode)}
24 * @param data Data object to be written
26 * @throws IllegalStateException if the client code already sealed transaction and invoked
29 void write(YangInstanceIdentifier path, NormalizedNode<?, ?> data);
32 * Store a provided data at specified path. This acts as a add / replace operation, which is to
33 * say that whole subtree will be replaced by specified path.
35 * If you need add or merge of current object with specified use
36 * {@link #merge(YangInstanceIdentifier, NormalizedNode)}
39 * @param data Data object to be written
41 * @throws IllegalStateException if the client code already sealed transaction and invoked
44 void merge(YangInstanceIdentifier path, NormalizedNode<?, ?> data);
48 * Deletes data and whole subtree located at provided path.
52 * @throws IllegalStateException
53 * if the client code already sealed transaction and invoked
56 void delete(YangInstanceIdentifier path);
60 * Seals transaction, and returns three-phase commit cohort associated
61 * with this transaction and DOM Store to be coordinated by coordinator.
63 * @return Three Phase Commit Cohort instance for this transaction.
65 DOMStoreThreePhaseCommitCohort ready();