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;
18 * @deprecated Replaced by {@link AsyncWriteTransaction}
21 public interface DataModification<P extends Path<P>, D> extends DataChange<P, D>, DataReader<P, D> {
23 * Returns transaction identifier.
25 * @return Transaction identifier
27 Object getIdentifier();
29 TransactionStatus getStatus();
32 * Store a piece of data at specified path. This acts as a merge operation,
33 * which is to say that any pre-existing data which is not explicitly
34 * overwritten will be preserved. This means that if you store a container,
35 * its child lists will be merged. Performing the following put operations:
38 * 1) container { list [ a ] }
39 * 2) container { list [ b ] }
42 * will result in the following data being present:
45 * container { list [ a, b ] }
48 * This also means that storing the container will preserve any augmentations
49 * which have been attached to it.
52 * If you require an explicit replace operation, perform
53 * {@link removeOperationalData} first.
55 void putOperationalData(P path, D data);
58 * Store a piece of data at specified path. This acts as a merge operation,
59 * which is to say that any pre-existing data which is not explicitly
60 * overwritten will be preserved. This means that if you store a container,
61 * its child lists will be merged. Performing the following put operations:
64 * 1) container { list [ a ] }
65 * 2) container { list [ b ] }
68 * will result in the following data being present:
71 * container { list [ a, b ] }
74 * This also means that storing the container will preserve any augmentations
75 * which have been attached to it.
78 * If you require an explicit replace operation, perform
79 * {@link removeConfigurationData} first.
81 void putConfigurationData(P path, D data);
83 void removeOperationalData(P path);
85 void removeConfigurationData(P path);
88 * Initiates a two-phase commit of modification.
91 * The successful commit changes the state of the system and may affect
95 * The effects of successful commit of data are described in the
96 * specifications and YANG models describing the Provider components of
97 * controller. It is assumed that Consumer has an understanding of this
100 * @return Result of the Commit, containing success information or list of
101 * encountered errors, if commit was not successful. The Future
102 * blocks until {@link TransactionStatus#COMMITED} or
103 * {@link TransactionStatus#FAILED} is reached.
105 Future<RpcResult<TransactionStatus>> commit();