Bug 6714 - Use singleton service in clustered netconf topology
[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      * Delete node in particular data-store in path
24      * @param store data-store type
25      * @param path unique identifier of a particular node instance in the data tree
26      */
27     void doDelete(LogicalDatastoreType store, YangInstanceIdentifier path);
28
29     /**
30      * Commit opened transaction.
31      * @param recipient recipient of submit result
32      * @param sender sender of submit result
33      */
34     void doSubmit(ActorRef recipient, ActorRef sender);
35
36     /**
37      * Cancel operation
38      * @param recipient recipient of cancel result
39      * @param sender sender of cancel result
40      */
41     void doCancel(ActorRef recipient, ActorRef sender);
42
43     /**
44      * Put data to particular data-store
45      * @param store data-store type
46      * @param data data for inserting included in NormalizedNodeMessage object
47      */
48     void doPut(LogicalDatastoreType store, NormalizedNodeMessage data);
49
50     /**
51      * Merge data with existing node in particular data-store
52      * @param store data-store type
53      * @param data data for merging included in NormalizedNodeMessage object
54      */
55     void doMerge(LogicalDatastoreType store, NormalizedNodeMessage data);
56
57     /**
58      * Read data from particular data-store
59      * @param store data-store type
60      * @param path unique identifier of a particular node instance in the data tree
61      * @param recipient recipient of read result
62      * @param sender sender of read result
63      */
64     void doRead(LogicalDatastoreType store, YangInstanceIdentifier path, ActorRef recipient, ActorRef sender);
65
66     /**
67      * Test existence of node in certain data-store
68      * @param store data-store type
69      * @param path unique identifier of a particular node instance in the data tree
70      * @param recipient recipient of exists result
71      * @param sender sender of exists result
72      */
73     void doExists(LogicalDatastoreType store, YangInstanceIdentifier path, ActorRef recipient, ActorRef sender);
74
75 }