5d1c893f48aebf3863044606bd06503adf2b01ab
[netconf.git] / netconf / netconf-topology-singleton / src / main / java / org / opendaylight / netconf / topology / singleton / api / RemoteOperationTxProcessor.java
1 /*
2  * Copyright (c) 2016 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
9 package org.opendaylight.netconf.topology.singleton.api;
10
11 import akka.actor.ActorRef;
12 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
13 import org.opendaylight.netconf.topology.singleton.messages.NormalizedNodeMessage;
14 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
15
16 /**
17  * Provides API for remote calling operations of transactions. Slave sends message of particular
18  * operation to master and master performs it.
19  */
20 public interface RemoteOperationTxProcessor {
21
22     /**
23      * Opens a new transaction.
24      */
25     void doOpenTransaction(ActorRef recipient, ActorRef sender);
26
27     /**
28      * Delete node in particular data-store in path
29      * @param store data-store type
30      * @param path unique identifier of a particular node instance in the data tree
31      */
32     void doDelete(LogicalDatastoreType store, YangInstanceIdentifier path);
33
34     /**
35      * Commit opened transaction.
36      * @param recipient recipient of submit result
37      * @param sender sender of submit result
38      */
39     void doSubmit(ActorRef recipient, ActorRef sender);
40
41     /**
42      * Cancel operation
43      * @param recipient recipient of cancel result
44      * @param sender sender of cancel result
45      */
46     void doCancel(ActorRef recipient, ActorRef sender);
47
48     /**
49      * Put data to particular data-store
50      * @param store data-store type
51      * @param data data for inserting included in NormalizedNodeMessage object
52      */
53     void doPut(LogicalDatastoreType store, NormalizedNodeMessage data);
54
55     /**
56      * Merge data with existing node in particular data-store
57      * @param store data-store type
58      * @param data data for merging included in NormalizedNodeMessage object
59      */
60     void doMerge(LogicalDatastoreType store, NormalizedNodeMessage data);
61
62     /**
63      * Read data from particular data-store
64      * @param store data-store type
65      * @param path unique identifier of a particular node instance in the data tree
66      * @param recipient recipient of read result
67      * @param sender sender of read result
68      */
69     void doRead(LogicalDatastoreType store, YangInstanceIdentifier path, ActorRef recipient, ActorRef sender);
70
71     /**
72      * Test existence of node in certain data-store
73      * @param store data-store type
74      * @param path unique identifier of a particular node instance in the data tree
75      * @param recipient recipient of exists result
76      * @param sender sender of exists result
77      */
78     void doExists(LogicalDatastoreType store, YangInstanceIdentifier path, ActorRef recipient, ActorRef sender);
79
80 }