82e62255c3ba465c86ef665038f362b6cad1f0fe
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / sal / core / api / data / DataModificationTransaction.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.sal.core.api.data;
9
10 import java.util.EventListener;
11 import java.util.concurrent.Future;
12
13 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
14 import org.opendaylight.controller.md.sal.common.api.data.DataModification;
15 import org.opendaylight.yangtools.concepts.ListenerRegistration;
16 import org.opendaylight.yangtools.yang.common.RpcResult;
17 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
18 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
19
20 /**
21  *
22  * @deprecated Replaced by more specific
23  *             {@link org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction}
24  *             ,
25  *             {@link org.opendaylight.controller.md.sal.dom.api.DOMDataReadTransaction}
26  *             or {@link org.opendaylight.controller.md.sal.dom.api.DOMDataReadWriteTransaction}
27  *
28  */
29 @Deprecated
30 public interface DataModificationTransaction extends DataModification<InstanceIdentifier, CompositeNode> {
31
32     /**
33      * Returns transaction identifier
34      *
35      * @return Transaction identifier
36      */
37     @Override
38     Object getIdentifier();
39
40     @Override
41     TransactionStatus getStatus();
42
43     /**
44      * Commits transaction to be stored in global data repository.
45      *
46      *
47      * @return Future object which returns RpcResult with TransactionStatus when
48      *         transaction is processed by store.
49      */
50     @Override
51     Future<RpcResult<TransactionStatus>> commit();
52
53     ListenerRegistration<DataTransactionListener> registerListener(DataTransactionListener listener);
54
55     public interface DataTransactionListener extends EventListener {
56         void onStatusUpdated(DataModificationTransaction transaction, TransactionStatus status);
57     }
58 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.