blob: f55945fde3c5c4106bcacd457ed97b840e73336a [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 */
25public interface ControlPlaneLoad extends Load {
26
27 /**
28 * Obtain the average of the specified time duration.
29 *
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 /**
37 * Obtain the average of all time duration.
38 *
39 * @return average control plane metric value
40 */
41 long average();
42}