Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 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 | */ |
| 16 | package org.onosproject.net.intent; |
| 17 | |
Madan Jampani | 3b8101a | 2016-09-15 13:22:01 -0700 | [diff] [blame] | 18 | import java.util.function.Function; |
| 19 | |
Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 20 | import org.onosproject.cluster.NodeId; |
| 21 | |
Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 22 | /** |
Madan Jampani | 3b8101a | 2016-09-15 13:22:01 -0700 | [diff] [blame] | 23 | * Testing adapter for the WorkPartitionService. |
Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 24 | */ |
Madan Jampani | 3b8101a | 2016-09-15 13:22:01 -0700 | [diff] [blame] | 25 | public class WorkPartitionServiceAdapter implements WorkPartitionService { |
Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 26 | @Override |
Madan Jampani | 3b8101a | 2016-09-15 13:22:01 -0700 | [diff] [blame] | 27 | public <K> boolean isMine(K id, Function<K, Long> hasher) { |
Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 28 | return true; |
| 29 | } |
| 30 | |
| 31 | @Override |
Madan Jampani | 3b8101a | 2016-09-15 13:22:01 -0700 | [diff] [blame] | 32 | public <K> NodeId getLeader(K id, Function<K, Long> hasher) { |
Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 33 | return null; |
| 34 | } |
| 35 | |
| 36 | @Override |
Madan Jampani | 3b8101a | 2016-09-15 13:22:01 -0700 | [diff] [blame] | 37 | public void addListener(WorkPartitionEventListener listener) { |
Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 38 | |
| 39 | } |
| 40 | |
| 41 | @Override |
Madan Jampani | 3b8101a | 2016-09-15 13:22:01 -0700 | [diff] [blame] | 42 | public void removeListener(WorkPartitionEventListener listener) { |
Ray Milkey | 3595823 | 2015-07-29 11:19:28 -0700 | [diff] [blame] | 43 | |
| 44 | } |
| 45 | } |