blob: 40d12ff6dd94c697b7565d0dc38ccb2087beda1a [file] [log] [blame]
Madan Jampani08822c42014-11-04 17:17:46 -08001package org.onlab.onos.store.service;
2
Yuta HIGUCHI60731cb2014-11-11 01:34:46 -08003import java.util.Collection;
Madan Jampani08822c42014-11-04 17:17:46 -08004import java.util.List;
5
Yuta HIGUCHI60731cb2014-11-11 01:34:46 -08006import org.onlab.onos.cluster.ControllerNode;
7
Madan Jampani08822c42014-11-04 17:17:46 -08008/**
Madan Jampani37c2e702014-11-04 18:11:10 -08009 * Service interface for running administrative tasks on a Database.
Madan Jampani08822c42014-11-04 17:17:46 -080010 */
11public interface DatabaseAdminService {
12
13 /**
14 * Creates a new table.
15 * Table creation is idempotent. Attempting to create a table
16 * that already exists will be a noop.
17 * @param name table name.
18 * @return true if the table was created by this call, false otherwise.
19 */
20 public boolean createTable(String name);
21
22 /**
23 * Lists all the tables in the database.
24 * @return list of table names.
25 */
26 public List<String> listTables();
27
28 /**
29 * Deletes a table from the database.
30 * @param name name of the table to delete.
31 */
32 public void dropTable(String name);
33
34 /**
35 * Deletes all tables from the database.
36 */
37 public void dropAllTables();
Yuta HIGUCHI60731cb2014-11-11 01:34:46 -080038
39
40 /**
41 * Add member to default Tablet.
42 *
43 * @param node to add
44 */
45 public void addMember(ControllerNode node);
46
47 /**
48 * Remove member from default Tablet.
49 *
50 * @param node node to remove
51 */
52 public void removeMember(ControllerNode node);
53
54 /**
55 * List members forming default Tablet.
56 *
57 * @return Copied collection of members forming default Tablet.
58 */
59 public Collection<ControllerNode> listMembers();
Madan Jampani08822c42014-11-04 17:17:46 -080060}