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 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.mastership; |
tom | b41d1ac | 2014-09-24 01:51:24 -0700 | [diff] [blame] | 17 | |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 18 | import org.onosproject.cluster.NodeId; |
| 19 | import org.onosproject.cluster.RoleInfo; |
| 20 | import org.onosproject.net.DeviceId; |
| 21 | import org.onosproject.net.MastershipRole; |
tom | b41d1ac | 2014-09-24 01:51:24 -0700 | [diff] [blame] | 22 | |
| 23 | import java.util.Set; |
| 24 | |
| 25 | /** |
| 26 | * Test adapter for mastership service. |
| 27 | */ |
| 28 | public class MastershipServiceAdapter implements MastershipService { |
| 29 | @Override |
| 30 | public MastershipRole getLocalRole(DeviceId deviceId) { |
| 31 | return null; |
| 32 | } |
| 33 | |
| 34 | @Override |
| 35 | public MastershipRole requestRoleFor(DeviceId deviceId) { |
| 36 | return null; |
| 37 | } |
| 38 | |
| 39 | @Override |
| 40 | public void relinquishMastership(DeviceId deviceId) { |
| 41 | } |
| 42 | |
| 43 | @Override |
| 44 | public NodeId getMasterFor(DeviceId deviceId) { |
| 45 | return null; |
| 46 | } |
| 47 | |
| 48 | @Override |
| 49 | public Set<DeviceId> getDevicesOf(NodeId nodeId) { |
| 50 | return null; |
| 51 | } |
| 52 | |
| 53 | @Override |
| 54 | public void addListener(MastershipListener listener) { |
| 55 | } |
| 56 | |
| 57 | @Override |
| 58 | public void removeListener(MastershipListener listener) { |
| 59 | } |
Ayaka Koshibe | b70d34b | 2014-09-25 15:43:01 -0700 | [diff] [blame] | 60 | |
| 61 | @Override |
Ayaka Koshibe | abedb09 | 2014-10-20 17:01:31 -0700 | [diff] [blame] | 62 | public RoleInfo getNodesFor(DeviceId deviceId) { |
Ayaka Koshibe | 45503ce | 2014-10-14 11:26:45 -0700 | [diff] [blame] | 63 | return null; |
| 64 | } |
tom | b41d1ac | 2014-09-24 01:51:24 -0700 | [diff] [blame] | 65 | } |