Added more ignorable files to .gitignore
[ovsdb.git] / ovsdb / src / main / java / org / opendaylight / ovsdb / lib / message / OvsdbRPC.java
1 /*
2  * Copyright (C) 2013 EBay Software Foundation
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  * Authors : Ashwin Raveendran, Madhu Venugopal
9  */
10 package org.opendaylight.ovsdb.lib.message;
11
12 import java.util.List;
13
14 import com.fasterxml.jackson.databind.JsonNode;
15 import com.google.common.util.concurrent.ListenableFuture;
16
17 import org.opendaylight.controller.sal.core.Node;
18 import org.opendaylight.ovsdb.lib.operations.OperationResult;
19
20 public interface OvsdbRPC {
21     public static final String REGISTER_CALLBACK_METHOD = "registerCallback";
22
23     //public ListenableFuture<DatabaseSchema> get_schema(List<String> db_names);
24     public ListenableFuture<JsonNode> get_schema(List<String> db_names);
25
26     public ListenableFuture<List<String>> echo();
27
28     public ListenableFuture<TableUpdates> monitor(MonitorRequestBuilder request);
29
30     public ListenableFuture<List<String>> list_dbs();
31
32     public ListenableFuture<List<OperationResult>> transact(TransactBuilder transact);
33
34     public ListenableFuture<Response> cancel(String id);
35
36     public ListenableFuture<Object> monitor_cancel(Object json_value);
37
38     public ListenableFuture<Object> lock(List<String> id);
39
40     public ListenableFuture<Object> steal(List<String> id);
41
42     public ListenableFuture<Object> unlock(List<String> id);
43
44     public boolean registerCallback(Callback callback);
45
46
47     public static interface Callback {
48         public void update(Node node, UpdateNotification upadateNotification);
49         public void locked(Node node, List<String> ids);
50         public void stolen(Node node, List<String> ids);
51         // ECHO is handled by JsonRPCEndpoint directly.
52         // We can add Echo request here if there is a need for clients to handle it.
53     }
54 }