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.controller.sal.core.spi.data;
10 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
11 import org.opendaylight.yangtools.concepts.Path;
12 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
13 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
15 public interface DOMStoreWriteTransaction extends DOMStoreTransaction {
18 * Store a provided data at specified path. This acts as a add / replace
19 * operation, which is to say that whole subtree will be replaced by
22 * If you need add or merge of current object with specified use
23 * {@link #merge(LogicalDatastoreType, Path, Object)}
28 * Data object to be written
30 * @throws IllegalStateException
31 * if the client code already sealed transaction and invoked
34 void write(InstanceIdentifier path, NormalizedNode<?, ?> data);
38 * Deletes data and whole subtree located at provided path.
42 * @throws IllegalStateException
43 * if the client code already sealed transaction and invoked
46 void delete(InstanceIdentifier path);
50 * Seals transaction, and returns three-phase commit cohort associated
51 * with this transaction and DOM Store to be coordinated by coordinator.
53 * @return Three Phase Commit Cohort instance for this transaction.
55 DOMStoreThreePhaseCommitCohort ready();