blob: c5ecf9f7a496f0b4232287b5edcc33945bd3ec97 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2014-present Open Networking Laboratory
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07003 *
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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.store.flow;
Yuta HIGUCHIb25f4da2014-10-16 15:09:26 -070017
Brian O'Connorabafb502014-12-02 22:26:20 -080018import org.onosproject.net.DeviceId;
Yuta HIGUCHIb25f4da2014-10-16 15:09:26 -070019
20/**
Yuta HIGUCHI4d187952014-10-16 19:59:35 -070021 * Service to return where the replica should be placed.
Yuta HIGUCHIb25f4da2014-10-16 15:09:26 -070022 */
23public interface ReplicaInfoService {
24
25 // returns where it should be.
26 /**
27 * Returns the placement information for given Device.
28 *
29 * @param deviceId identifier of the device
30 * @return placement information
31 */
32 ReplicaInfo getReplicaInfoFor(DeviceId deviceId);
Yuta HIGUCHI4d187952014-10-16 19:59:35 -070033
34 /**
35 * Adds the specified replica placement info change listener.
36 *
37 * @param listener the replica placement info change listener
38 */
39 void addListener(ReplicaInfoEventListener listener);
40
41 /**
42 * Removes the specified replica placement info change listener.
43 *
44 * @param listener the replica placement info change listener
45 */
46 void removeListener(ReplicaInfoEventListener listener);
47
Yuta HIGUCHIb25f4da2014-10-16 15:09:26 -070048}