blob: aff67cde7509132fe6198c473ca406eeb0e4b499 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
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'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.mastership;
tomb41d1ac2014-09-24 01:51:24 -070017
Brian O'Connorabafb502014-12-02 22:26:20 -080018import org.onosproject.cluster.NodeId;
19import org.onosproject.cluster.RoleInfo;
20import org.onosproject.net.DeviceId;
21import org.onosproject.net.MastershipRole;
tomb41d1ac2014-09-24 01:51:24 -070022
23import java.util.Set;
Madan Jampanide003d92015-05-11 17:14:20 -070024import java.util.concurrent.CompletableFuture;
tomb41d1ac2014-09-24 01:51:24 -070025
26/**
27 * Test adapter for mastership service.
28 */
29public class MastershipServiceAdapter implements MastershipService {
30 @Override
31 public MastershipRole getLocalRole(DeviceId deviceId) {
32 return null;
33 }
34
35 @Override
Madan Jampanide003d92015-05-11 17:14:20 -070036 public CompletableFuture<MastershipRole> requestRoleFor(DeviceId deviceId) {
tomb41d1ac2014-09-24 01:51:24 -070037 return null;
38 }
39
40 @Override
41 public void relinquishMastership(DeviceId deviceId) {
42 }
43
44 @Override
45 public NodeId getMasterFor(DeviceId deviceId) {
46 return null;
47 }
48
49 @Override
50 public Set<DeviceId> getDevicesOf(NodeId nodeId) {
51 return null;
52 }
53
54 @Override
55 public void addListener(MastershipListener listener) {
56 }
57
58 @Override
59 public void removeListener(MastershipListener listener) {
60 }
Ayaka Koshibeb70d34b2014-09-25 15:43:01 -070061
62 @Override
Ayaka Koshibeabedb092014-10-20 17:01:31 -070063 public RoleInfo getNodesFor(DeviceId deviceId) {
Ayaka Koshibe45503ce2014-10-14 11:26:45 -070064 return null;
65 }
tomb41d1ac2014-09-24 01:51:24 -070066}