blob: 24f8b93eb663182097335efcba21a2a6dedea9b9 [file] [log] [blame]
Jian Li0967cd72015-11-25 17:38:48 -08001/*
2 * Copyright 2015 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 */
16package org.onosproject.cpman;
17
18/**
19 * Include various control plane metrics.
20 */
Jian Li60804322015-12-02 14:46:31 -080021public class ControlMetric {
Jian Li0967cd72015-11-25 17:38:48 -080022
Jian Li60804322015-12-02 14:46:31 -080023 private final ControlMetricType metricType;
24 private final MetricValue metricValue;
25
Jian Lic5cb4a12016-02-03 23:24:42 -080026 /**
27 * Constructs a control metric using the given control metric type and
28 * metric value.
29 *
30 * @param metricType metric type reference
31 * @param metricValue metric value reference
32 */
Jian Lic132c112016-01-28 20:27:34 -080033 public ControlMetric(ControlMetricType metricType, MetricValue metricValue) {
Jian Li60804322015-12-02 14:46:31 -080034 this.metricType = metricType;
35 this.metricValue = metricValue;
36 }
Jian Li0967cd72015-11-25 17:38:48 -080037
Jian Lic5cb4a12016-02-03 23:24:42 -080038 /**
39 * Returns metric type reference.
40 *
41 * @return metric type reference
42 */
Jian Li7d180c52016-02-01 21:53:08 -080043 public ControlMetricType metricType() {
Jian Li0967cd72015-11-25 17:38:48 -080044 return metricType;
45 }
46
Jian Lic5cb4a12016-02-03 23:24:42 -080047 /**
48 * Returns metric value reference.
49 *
50 * @return metric value reference
51 */
Jian Li7d180c52016-02-01 21:53:08 -080052 public MetricValue metricValue() {
Jian Li0967cd72015-11-25 17:38:48 -080053 return metricValue;
54 }
Jian Li0967cd72015-11-25 17:38:48 -080055}