Jian Li | 6080432 | 2015-12-02 14:46:31 -0800 | [diff] [blame] | 1 | /* |
Jian Li | e044d1a | 2016-01-25 09:01:20 -0800 | [diff] [blame] | 2 | * Copyright 2015-2016 Open Networking Laboratory |
Jian Li | 6080432 | 2015-12-02 14:46:31 -0800 | [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 | */ |
Jian Li | 6b86a76 | 2016-01-29 09:30:40 -0800 | [diff] [blame] | 16 | package org.onosproject.cpman.impl; |
Jian Li | 6080432 | 2015-12-02 14:46:31 -0800 | [diff] [blame] | 17 | |
| 18 | import org.apache.felix.scr.annotations.Activate; |
Jian Li | c132c11 | 2016-01-28 20:27:34 -0800 | [diff] [blame] | 19 | import org.apache.felix.scr.annotations.Component; |
Jian Li | 6080432 | 2015-12-02 14:46:31 -0800 | [diff] [blame] | 20 | import org.apache.felix.scr.annotations.Deactivate; |
Jian Li | 6080432 | 2015-12-02 14:46:31 -0800 | [diff] [blame] | 21 | import org.apache.felix.scr.annotations.Service; |
| 22 | import org.onosproject.cluster.NodeId; |
Jian Li | 6b86a76 | 2016-01-29 09:30:40 -0800 | [diff] [blame] | 23 | import org.onosproject.cpman.ControlLoad; |
| 24 | import org.onosproject.cpman.ControlMetric; |
| 25 | import org.onosproject.cpman.ControlMetricType; |
| 26 | import org.onosproject.cpman.ControlPlaneMonitorService; |
Jian Li | 6080432 | 2015-12-02 14:46:31 -0800 | [diff] [blame] | 27 | import org.onosproject.net.DeviceId; |
Jian Li | 6080432 | 2015-12-02 14:46:31 -0800 | [diff] [blame] | 28 | import org.slf4j.Logger; |
| 29 | |
| 30 | import java.util.Optional; |
| 31 | import java.util.concurrent.TimeUnit; |
| 32 | |
| 33 | import static org.slf4j.LoggerFactory.getLogger; |
| 34 | |
| 35 | /** |
| 36 | * Control plane monitoring service class. |
| 37 | */ |
| 38 | @Component(immediate = true) |
| 39 | @Service |
| 40 | public class ControlPlaneMonitor implements ControlPlaneMonitorService { |
| 41 | |
| 42 | private final Logger log = getLogger(getClass()); |
| 43 | |
| 44 | @Activate |
| 45 | public void activate() { |
| 46 | } |
| 47 | |
| 48 | @Deactivate |
| 49 | public void deactivate() { |
| 50 | } |
| 51 | |
Jian Li | 6080432 | 2015-12-02 14:46:31 -0800 | [diff] [blame] | 52 | @Override |
Jian Li | c132c11 | 2016-01-28 20:27:34 -0800 | [diff] [blame] | 53 | public void updateMetric(ControlMetric cpm, Integer updateInterval, |
Jian Li | 6080432 | 2015-12-02 14:46:31 -0800 | [diff] [blame] | 54 | Optional<DeviceId> deviceId) { |
Jian Li | 4614890 | 2016-01-29 13:33:50 -0800 | [diff] [blame^] | 55 | |
Jian Li | 6080432 | 2015-12-02 14:46:31 -0800 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | @Override |
Jian Li | c132c11 | 2016-01-28 20:27:34 -0800 | [diff] [blame] | 59 | public void updateMetric(ControlMetric controlMetric, Integer updateInterval, |
Jian Li | e044d1a | 2016-01-25 09:01:20 -0800 | [diff] [blame] | 60 | String resourceName) { |
| 61 | |
| 62 | } |
| 63 | |
| 64 | @Override |
Jian Li | 6080432 | 2015-12-02 14:46:31 -0800 | [diff] [blame] | 65 | public ControlLoad getLoad(NodeId nodeId, ControlMetricType type, |
| 66 | Optional<DeviceId> deviceId) { |
| 67 | return null; |
| 68 | } |
| 69 | |
| 70 | @Override |
| 71 | public ControlLoad getLoad(NodeId nodeId, ControlMetricType type, |
| 72 | Optional<DeviceId> deviceId, int duration, TimeUnit unit) { |
| 73 | return null; |
| 74 | } |
| 75 | } |