2 * Copyright (c) 2013 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.md.sal.common.api.data;
10 import java.util.concurrent.Future;
12 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
13 import org.opendaylight.yangtools.concepts.Path;
14 import org.opendaylight.yangtools.yang.common.RpcResult;
17 * @deprecated Replaced by {@link AsyncWriteTransaction}
20 public interface DataModification<P extends Path<P>, D> extends DataChange<P, D>, DataReader<P, D> {
22 * Returns transaction identifier
24 * @return Transaction identifier
26 Object getIdentifier();
28 TransactionStatus getStatus();
31 * Store a piece of data at specified path. This acts as a merge operation,
32 * which is to say that any pre-existing data which is not explicitly
33 * overwritten will be preserved. This means that if you store a container,
34 * its child lists will be merged. Performing the following put operations:
36 * 1) container { list [ a ] }
37 * 2) container { list [ b ] }
39 * will result in the following data being present:
41 * container { list [ a, b ] }
43 * This also means that storing the container will preserve any augmentations
44 * which have been attached to it.
46 * If you require an explicit replace operation, perform
47 * {@link removeOperationalData} first.
49 void putOperationalData(P path, D data);
52 * Store a piece of data at specified path. This acts as a merge operation,
53 * which is to say that any pre-existing data which is not explicitly
54 * overwritten will be preserved. This means that if you store a container,
55 * its child lists will be merged. Performing the following put operations:
57 * 1) container { list [ a ] }
58 * 2) container { list [ b ] }
60 * will result in the following data being present:
62 * container { list [ a, b ] }
64 * This also means that storing the container will preserve any augmentations
65 * which have been attached to it.
67 * If you require an explicit replace operation, perform
68 * {@link removeConfigurationData} first.
70 void putConfigurationData(P path, D data);
72 void removeOperationalData(P path);
74 void removeConfigurationData(P path);
77 * Initiates a two-phase commit of modification.
80 * The successful commit changes the state of the system and may affect
84 * The effects of successful commit of data are described in the
85 * specifications and YANG models describing the Provider components of
86 * controller. It is assumed that Consumer has an understanding of this
90 * @see DataCommitHandler for further information how two-phase commit is
93 * Identifier of the store, where commit should occur.
94 * @return Result of the Commit, containing success information or list of
95 * encountered errors, if commit was not successful. The Future
96 * blocks until {@link TransactionStatus#COMMITED} or
97 * {@link TransactionStatus#FAILED} is reached.
99 Future<RpcResult<TransactionStatus>> commit();