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