2 * Copyright 2015 Open Networking Laboratory
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
17 package org.onosproject.net.statistic;
\r
19 import org.onosproject.net.ConnectPoint;
\r
22 * Summary Load classified by flow live type.
\r
24 public class SummaryFlowEntryWithLoad {
\r
25 private ConnectPoint cp;
\r
26 private Load totalLoad;
\r
27 private Load immediateLoad;
\r
28 private Load shortLoad;
\r
29 private Load midLoad;
\r
30 private Load longLoad;
\r
31 private Load unknownLoad;
\r
34 * Creates a new summary flow entry having load for the given connect point and total load.
\r
36 * @param cp connect point
\r
37 * @param totalLoad total load
\r
39 public SummaryFlowEntryWithLoad(ConnectPoint cp, Load totalLoad) {
\r
41 this.totalLoad = totalLoad;
\r
42 this.immediateLoad = new DefaultLoad();
\r
43 this.shortLoad = new DefaultLoad();
\r
44 this.midLoad = new DefaultLoad();
\r
45 this.longLoad = new DefaultLoad();
\r
46 this.unknownLoad = new DefaultLoad();
\r
50 * Creates a new summary flow entry having load for the given connect point
\r
51 * and total, immediate, short, mid, and long load.
\r
53 * @param cp connect point
\r
54 * @param totalLoad total load
\r
55 * @param immediateLoad immediate load
\r
56 * @param shortLoad short load
\r
57 * @param midLoad mid load
\r
58 * @param longLoad long load
\r
60 public SummaryFlowEntryWithLoad(ConnectPoint cp,
\r
61 Load totalLoad, Load immediateLoad, Load shortLoad, Load midLoad, Load longLoad) {
\r
63 this.totalLoad = totalLoad;
\r
64 this.immediateLoad = immediateLoad;
\r
65 this.shortLoad = shortLoad;
\r
66 this.midLoad = midLoad;
\r
67 this.longLoad = longLoad;
\r
68 this.unknownLoad = new DefaultLoad();
\r
72 * Creates a new summary flow entry having load for the given connect point
\r
73 * and total, immediate, short, mid, long, and unknown load.
\r
75 * @param cp connect point
\r
76 * @param totalLoad total load
\r
77 * @param immediateLoad immediate load
\r
78 * @param shortLoad short load
\r
79 * @param midLoad mid load
\r
80 * @param longLoad long load
\r
81 * @param unknownLoad long load
\r
83 public SummaryFlowEntryWithLoad(ConnectPoint cp,
\r
84 Load totalLoad, Load immediateLoad,
\r
85 Load shortLoad, Load midLoad, Load longLoad, Load unknownLoad) {
\r
87 this.totalLoad = totalLoad;
\r
88 this.immediateLoad = immediateLoad;
\r
89 this.shortLoad = shortLoad;
\r
90 this.midLoad = midLoad;
\r
91 this.longLoad = longLoad;
\r
92 this.unknownLoad = unknownLoad;
\r
96 * Returns connect point.
\r
98 public ConnectPoint connectPoint() {
\r
103 * Returns total load of connect point.
\r
105 public Load totalLoad() {
\r
110 * Returns immediate load of connect point.
\r
112 public Load immediateLoad() {
\r
113 return immediateLoad;
\r
117 * Returns short load of connect point.
\r
119 public Load shortLoad() {
\r
124 * Returns mid load of connect point.
\r
126 public Load midLoad() {
\r
131 * Returns long load of connect point.
\r
133 public Load longLoad() {
\r
138 * Returns unknown load of connect point.
\r
140 public Load unknownLoad() {
\r
141 return unknownLoad;
\r