blob: 31c65abea4bd86bf2ab71a5be32bc3bdb96b8a16 [file] [log] [blame]
Ray Milkey35958232015-07-29 11:19:28 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Ray Milkey35958232015-07-29 11:19:28 -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 */
16package org.onosproject.net.intent;
17
Madan Jampani3b8101a2016-09-15 13:22:01 -070018import java.util.function.Function;
19
Ray Milkey35958232015-07-29 11:19:28 -070020import org.onosproject.cluster.NodeId;
21
Ray Milkey35958232015-07-29 11:19:28 -070022/**
Madan Jampani3b8101a2016-09-15 13:22:01 -070023 * Testing adapter for the WorkPartitionService.
Ray Milkey35958232015-07-29 11:19:28 -070024 */
Madan Jampani3b8101a2016-09-15 13:22:01 -070025public class WorkPartitionServiceAdapter implements WorkPartitionService {
Ray Milkey35958232015-07-29 11:19:28 -070026 @Override
Madan Jampani3b8101a2016-09-15 13:22:01 -070027 public <K> boolean isMine(K id, Function<K, Long> hasher) {
Ray Milkey35958232015-07-29 11:19:28 -070028 return true;
29 }
30
31 @Override
Madan Jampani3b8101a2016-09-15 13:22:01 -070032 public <K> NodeId getLeader(K id, Function<K, Long> hasher) {
Ray Milkey35958232015-07-29 11:19:28 -070033 return null;
34 }
35
36 @Override
Madan Jampani3b8101a2016-09-15 13:22:01 -070037 public void addListener(WorkPartitionEventListener listener) {
Ray Milkey35958232015-07-29 11:19:28 -070038
39 }
40
41 @Override
Madan Jampani3b8101a2016-09-15 13:22:01 -070042 public void removeListener(WorkPartitionEventListener listener) {
Ray Milkey35958232015-07-29 11:19:28 -070043
44 }
45}