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;
11 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
12 import org.opendaylight.yangtools.concepts.Path;
13 import org.opendaylight.yangtools.yang.common.RpcResult;
16 * @deprecated Replaced by {@link AsyncWriteTransaction}
19 public interface DataModification<P extends Path<P>, D> extends DataChange<P, D>, DataReader<P, D> {
21 * Returns transaction identifier
23 * @return Transaction identifier
25 Object getIdentifier();
27 TransactionStatus getStatus();
30 * Store a piece of data at specified path. This acts as a merge operation,
31 * which is to say that any pre-existing data which is not explicitly
32 * overwritten will be preserved. This means that if you store a container,
33 * its child lists will be merged. Performing the following put operations:
35 * 1) container { list [ a ] }
36 * 2) container { list [ b ] }
38 * will result in the following data being present:
40 * container { list [ a, b ] }
42 * This also means that storing the container will preserve any augmentations
43 * which have been attached to it.
45 * If you require an explicit replace operation, perform
46 * {@link removeOperationalData} first.
48 void putOperationalData(P path, D data);
51 * Store a piece of data at specified path. This acts as a merge operation,
52 * which is to say that any pre-existing data which is not explicitly
53 * overwritten will be preserved. This means that if you store a container,
54 * its child lists will be merged. Performing the following put operations:
56 * 1) container { list [ a ] }
57 * 2) container { list [ b ] }
59 * will result in the following data being present:
61 * container { list [ a, b ] }
63 * This also means that storing the container will preserve any augmentations
64 * which have been attached to it.
66 * If you require an explicit replace operation, perform
67 * {@link removeConfigurationData} first.
69 void putConfigurationData(P path, D data);
71 void removeOperationalData(P path);
73 void removeConfigurationData(P path);
76 * Initiates a two-phase commit of modification.
79 * The successful commit changes the state of the system and may affect
83 * The effects of successful commit of data are described in the
84 * specifications and YANG models describing the Provider components of
85 * controller. It is assumed that Consumer has an understanding of this
88 * @return Result of the Commit, containing success information or list of
89 * encountered errors, if commit was not successful. The Future
90 * blocks until {@link TransactionStatus#COMMITED} or
91 * {@link TransactionStatus#FAILED} is reached.
93 Future<RpcResult<TransactionStatus>> commit();