blob: 3ec4e9b35c39c8d76b415a82f4a62c18e19ba7d1 [file] [log] [blame]
Madan Jampani08822c42014-11-04 17:17:46 -08001package org.onlab.onos.store.service;
2
3import java.util.List;
4
5/**
Madan Jampani37c2e702014-11-04 18:11:10 -08006 * Service interface for running administrative tasks on a Database.
Madan Jampani08822c42014-11-04 17:17:46 -08007 */
8public interface DatabaseAdminService {
9
10 /**
11 * Creates a new table.
12 * Table creation is idempotent. Attempting to create a table
13 * that already exists will be a noop.
14 * @param name table name.
15 * @return true if the table was created by this call, false otherwise.
16 */
17 public boolean createTable(String name);
18
19 /**
20 * Lists all the tables in the database.
21 * @return list of table names.
22 */
23 public List<String> listTables();
24
25 /**
26 * Deletes a table from the database.
27 * @param name name of the table to delete.
28 */
29 public void dropTable(String name);
30
31 /**
32 * Deletes all tables from the database.
33 */
34 public void dropAllTables();
35}