Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
| 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 | */ |
Yuta HIGUCHI | b25f4da | 2014-10-16 15:09:26 -0700 | [diff] [blame] | 16 | package org.onlab.onos.store.flow; |
| 17 | |
| 18 | import org.onlab.onos.net.DeviceId; |
| 19 | |
| 20 | /** |
Yuta HIGUCHI | 4d18795 | 2014-10-16 19:59:35 -0700 | [diff] [blame] | 21 | * Service to return where the replica should be placed. |
Yuta HIGUCHI | b25f4da | 2014-10-16 15:09:26 -0700 | [diff] [blame] | 22 | */ |
| 23 | public 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 HIGUCHI | 4d18795 | 2014-10-16 19:59:35 -0700 | [diff] [blame] | 33 | |
| 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 HIGUCHI | b25f4da | 2014-10-16 15:09:26 -0700 | [diff] [blame] | 48 | } |