blob: 6eb87038a935b01202477dcb1d7ed5d8a466451c [file] [log] [blame]
Madan Jampani12390c12014-11-12 00:35:56 -08001/*
2 * Copyright 2014 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onlab.onos.store.service.impl;
18
Madan Jampanidef2c652014-11-12 13:50:10 -080019import org.onlab.onos.store.service.impl.DatabaseStateMachine.TableMetadata;
20
Madan Jampani44e6a542014-11-12 01:06:51 -080021/**
22 * Interface of database update event listeners.
23 */
Madan Jampani12390c12014-11-12 00:35:56 -080024public interface DatabaseUpdateEventListener {
Madan Jampani44e6a542014-11-12 01:06:51 -080025
Madan Jampani12390c12014-11-12 00:35:56 -080026 /**
Madan Jampani44e6a542014-11-12 01:06:51 -080027 * Notifies listeners of a table modified event.
28 * @param event table modification event.
Madan Jampani12390c12014-11-12 00:35:56 -080029 */
30 public void tableModified(TableModificationEvent event);
Madan Jampani44e6a542014-11-12 01:06:51 -080031
Madan Jampani12390c12014-11-12 00:35:56 -080032 /**
Madan Jampani44e6a542014-11-12 01:06:51 -080033 * Notifies listeners of a table created event.
Madan Jampanidef2c652014-11-12 13:50:10 -080034 * @param metadata metadata for the created table.
Madan Jampani12390c12014-11-12 00:35:56 -080035 */
Madan Jampanidef2c652014-11-12 13:50:10 -080036 public void tableCreated(TableMetadata metadata);
Madan Jampani44e6a542014-11-12 01:06:51 -080037
Madan Jampani12390c12014-11-12 00:35:56 -080038 /**
Madan Jampani44e6a542014-11-12 01:06:51 -080039 * Notifies listeners of a table deleted event.
Madan Jampani9b37d572014-11-12 11:53:24 -080040 * @param tableName name of the table deleted
Madan Jampani12390c12014-11-12 00:35:56 -080041 */
42 public void tableDeleted(String tableName);
Madan Jampanidef2c652014-11-12 13:50:10 -080043
44 /**
45 * Notifies listeners of a snapshot installation event.
46 * @param snapshotState installed snapshot state.
47 */
48 public void snapshotInstalled(DatabaseStateMachine.State snapshotState);
49}