blob: 60da636a978248fed23f6d5ef92103dc48bb4865 [file] [log] [blame]
ssyoon90a98825a2015-08-26 00:48:15 +09001/*
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 */
16
17package org.onosproject.net.statistic;
18
19import org.onosproject.net.ConnectPoint;
20
21/**
22 * Summary Load classified by flow live type.
23 */
24public class SummaryFlowEntryWithLoad {
25 private ConnectPoint cp;
26 private Load totalLoad;
27 private Load immediateLoad;
28 private Load shortLoad;
29 private Load midLoad;
30 private Load longLoad;
31 private Load unknownLoad;
32
33 /**
34 * Creates a new summary flow entry having load for the given connect point and total load.
35 *
36 * @param cp connect point
37 * @param totalLoad total load
38 */
39 public SummaryFlowEntryWithLoad(ConnectPoint cp, Load totalLoad) {
40 this.cp = cp;
41 this.totalLoad = totalLoad;
42 this.immediateLoad = new DefaultLoad();
43 this.shortLoad = new DefaultLoad();
44 this.midLoad = new DefaultLoad();
45 this.longLoad = new DefaultLoad();
46 this.unknownLoad = new DefaultLoad();
47 }
48
49 /**
50 * Creates a new summary flow entry having load for the given connect point
51 * and total, immediate, short, mid, and long load.
52 *
53 * @param cp connect point
54 * @param totalLoad total load
55 * @param immediateLoad immediate load
56 * @param shortLoad short load
57 * @param midLoad mid load
58 * @param longLoad long load
59 */
60 public SummaryFlowEntryWithLoad(ConnectPoint cp,
61 Load totalLoad, Load immediateLoad, Load shortLoad, Load midLoad, Load longLoad) {
62 this.cp = cp;
63 this.totalLoad = totalLoad;
64 this.immediateLoad = immediateLoad;
65 this.shortLoad = shortLoad;
66 this.midLoad = midLoad;
67 this.longLoad = longLoad;
68 this.unknownLoad = new DefaultLoad();
69 }
70
71 /**
72 * Creates a new summary flow entry having load for the given connect point
73 * and total, immediate, short, mid, long, and unknown load.
74 *
75 * @param cp connect point
76 * @param totalLoad total load
77 * @param immediateLoad immediate load
78 * @param shortLoad short load
79 * @param midLoad mid load
80 * @param longLoad long load
81 * @param unknownLoad long load
82 */
83 public SummaryFlowEntryWithLoad(ConnectPoint cp,
84 Load totalLoad, Load immediateLoad,
85 Load shortLoad, Load midLoad, Load longLoad, Load unknownLoad) {
86 this.cp = cp;
87 this.totalLoad = totalLoad;
88 this.immediateLoad = immediateLoad;
89 this.shortLoad = shortLoad;
90 this.midLoad = midLoad;
91 this.longLoad = longLoad;
92 this.unknownLoad = unknownLoad;
93 }
94
95 /**
96 * Returns connect point.
97 */
98 public ConnectPoint connectPoint() {
99 return cp;
100 }
101
102 /**
103 * Returns total load of connect point.
104 */
105 public Load totalLoad() {
106 return totalLoad;
107 }
108
109 /**
110 * Returns immediate load of connect point.
111 */
112 public Load immediateLoad() {
113 return immediateLoad;
114 }
115
116 /**
117 * Returns short load of connect point.
118 */
119 public Load shortLoad() {
120 return shortLoad;
121 }
122
123 /**
124 * Returns mid load of connect point.
125 */
126 public Load midLoad() {
127 return midLoad;
128 }
129
130 /**
131 * Returns long load of connect point.
132 */
133 public Load longLoad() {
134 return longLoad;
135 }
136
137 /**
138 * Returns unknown load of connect point.
139 */
140 public Load unknownLoad() {
141 return unknownLoad;
142 }
143}