blob: b36c251ba3a6fc40852237d19f392812337d6fcc [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.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
Madan Jampanic6e574f2015-05-29 13:41:52 -070041 public CompletableFuture<Void> relinquishMastership(DeviceId deviceId) {
42 return null;
tomb41d1ac2014-09-24 01:51:24 -070043 }
44
45 @Override
46 public NodeId getMasterFor(DeviceId deviceId) {
47 return null;
48 }
49
50 @Override
51 public Set<DeviceId> getDevicesOf(NodeId nodeId) {
52 return null;
53 }
54
55 @Override
56 public void addListener(MastershipListener listener) {
57 }
58
59 @Override
60 public void removeListener(MastershipListener listener) {
61 }
Ayaka Koshibeb70d34b2014-09-25 15:43:01 -070062
63 @Override
Ayaka Koshibeabedb092014-10-20 17:01:31 -070064 public RoleInfo getNodesFor(DeviceId deviceId) {
Ayaka Koshibe45503ce2014-10-14 11:26:45 -070065 return null;
66 }
tomb41d1ac2014-09-24 01:51:24 -070067}