blob: b783aa65539e05da9f1fa4577e50eb77ea0a257b [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
18import org.onosproject.net.statistic.Load;
19
20import java.util.concurrent.TimeUnit;
21
22/**
23 * Data repository for control plane load information.
24 */
Jian Li60804322015-12-02 14:46:31 -080025public interface ControlLoad extends Load {
Jian Li0967cd72015-11-25 17:38:48 -080026
27 /**
Jian Li60804322015-12-02 14:46:31 -080028 * Obtains the average of the specified time duration.
Jian Li0967cd72015-11-25 17:38:48 -080029 *
30 * @param duration time duration
31 * @param unit time unit
32 * @return average control plane metric value
33 */
34 long average(int duration, TimeUnit unit);
35
36 /**
Jian Li60804322015-12-02 14:46:31 -080037 * Obtains the average of all time duration.
Jian Li0967cd72015-11-25 17:38:48 -080038 *
39 * @return average control plane metric value
40 */
41 long average();
42}