blob: 09b6e0efda749727d1476840a6e83b53c670a31e [file] [log] [blame]
Sean Condon0e89bda2017-03-21 14:23:19 +00001/*
2 * Copyright 2017-present Open Networking Foundation
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.incubator.net.l2monitoring.soam.loss;
17
18import java.time.Duration;
19
20import org.onosproject.incubator.net.l2monitoring.soam.MilliPct;
21
22/**
23 * Abstract base interface to represent Loss Availability Stats.
24 */
25public interface LossAvailabilityStat {
26
27 Duration elapsedTime();
28
29 /**
30 * Indicates whether the Measurement Interval has been marked as suspect.
31 * The object is set to false at the start of a measurement interval.
32 * Conditions for a discontinuity include, but are not limited to the following:
33 * 1 - The local time-of-day clock is adjusted by at least 10 seconds
34 * 2 - The conducting of a performance measurement is halted before the
35 * current Measurement Interval is completed
36 * 3 - A local test, failure, or reconfiguration that disrupts service
37 * @return true when there is a discontinuity in the performance measurements during the Measurement Interval
38 */
39 boolean suspectStatus();
40
41 /**
42 * The number of high loss intervals (HLI) over time in the forward direction.
43 * The value starts at 0 and increments for every HLI that occurs.
44 * This parameter is equivalent to 'L Sub T' found in MEF 10.2.1
45 * @return the number of intervals
46 */
47 Long forwardHighLoss();
48
49 /**
50 * The number of high loss intervals (HLI) over time in the backward direction.
51 * The value starts at 0 and increments for every HLI that occurs.
52 * This parameter is equivalent to 'L Sub T' found in MEF 10.2.1
53 * @return the number of intervals
54 */
55 Long backwardHighLoss();
56
57 /**
58 * The number of consecutive high loss intervals (CHLI) over time in the forward direction.
59 * The value starts at 0 and increments for every HLI that occurs.
60 * This parameter is equivalent to 'B Sub T' found in MEF 10.2.1
61 * @return the number of intervals
62 */
63 Long forwardConsecutiveHighLoss();
64
65 /**
66 * The number of consecutive high loss intervals (CHLI) over time in the backward direction.
67 * The value starts at 0 and increments for every HLI that occurs.
68 * This parameter is equivalent to 'B Sub T' found in MEF 10.2.1
69 * @return the number of intervals
70 */
71 Long backwardConsecutiveHighLoss();
72
73 /**
74 * The number of availability indicators during a small time interval.
75 * evaluated as available (low frame loss) in the forward direction by this
76 * MEP during this measurement interval.
77 * @return The number of availability indicators
78 */
79 Long forwardAvailable();
80
81 /**
82 * The number of availability indicators during a small time interval.
83 * evaluated as available (low frame loss) in the backward direction by
84 * this MEP during this measurement interval.
85 * @return The number of availability indicators
86 */
87 Long backwardAvailable();
88
89 /**
90 * The number of availability indicators during a small time interval.
91 * evaluated as unavailable (high frame loss) in the forward direction by
92 * this MEP during this measurement interval
93 * @return The number of availability indicators
94 */
95 Long forwardUnavailable();
96
97 /**
98 * The number of availability indicators during a small time interval.
99 * evaluated as unavailable (high frame loss) in the backward direction by
100 * this MEP during this measurement interval
101 * @return The number of availability indicators
102 */
103 Long backwardUnavailable();
104
105 /**
106 * The minimum one-way availability flr in the forward direction,.
107 * from among the set of availability flr values calculated by the MEP in this Measurement Interval.
108 * There is one availability flr value for each 'delta_t' time period within
109 * the Measurement Interval, as specified in MEF 10.2.1.
110 * The flr value is a ratio that is expressed as a percent with a value of 0
111 * (ratio 0.00) through 100000 (ratio 1.00).
112 * @return The ratio as 1/1000th of a percent, where 1 indicates 0.001 percent
113 */
114 MilliPct forwardMinFrameLossRatio();
115
116 /**
117 * The maximum one-way availability flr in the forward direction,.
118 * from among the set of availability flr values calculated by the MEP in this Measurement Interval.
119 * There is one availability flr value for each 'delta_t' time period within
120 * the Measurement Interval, as specified in MEF 10.2.1.
121 * The flr value is a ratio that is expressed as a percent with a value of 0
122 * (ratio 0.00) through 100000 (ratio 1.00).
123 * @return The ratio as 1/1000th of a percent, where 1 indicates 0.001 percent
124 */
125 MilliPct forwardMaxFrameLossRatio();
126
127 /**
128 * The average one-way availability flr in the forward direction,.
129 * from among the set of availability flr values calculated by the MEP in this Measurement Interval.
130 * There is one availability flr value for each 'delta_t' time period within
131 * the Measurement Interval, as specified in MEF 10.2.1.
132 * The flr value is a ratio that is expressed as a percent with a value of 0
133 * (ratio 0.00) through 100000 (ratio 1.00).
134 * @return The ratio as 1/1000th of a percent, where 1 indicates 0.001 percent
135 */
136 MilliPct forwardAverageFrameLossRatio();
137
138 /**
139 * The minimum one-way availability flr in the backward direction,.
140 * from among the set of availability flr values calculated by the MEP in this Measurement Interval.
141 * There is one availability flr value for each 'delta_t' time period within
142 * the Measurement Interval, as specified in MEF 10.2.1.
143 * The flr value is a ratio that is expressed as a percent with a value of 0
144 * (ratio 0.00) through 100000 (ratio 1.00).
145 * @return The ratio as 1/1000th of a percent, where 1 indicates 0.001 percent
146 */
147 MilliPct backwardMinFrameLossRatio();
148
149 /**
150 * The maximum one-way availability flr in the backward direction,.
151 * from among the set of availability flr values calculated by the MEP in this Measurement Interval.
152 * There is one availability flr value for each 'delta_t' time period within
153 * the Measurement Interval, as specified in MEF 10.2.1.
154 * The flr value is a ratio that is expressed as a percent with a value of 0
155 * (ratio 0.00) through 100000 (ratio 1.00).
156 * @return The ratio as 1/1000th of a percent, where 1 indicates 0.001 percent
157 */
158 MilliPct backwardMaxFrameLossRatio();
159
160 /**
161 * The average one-way availability flr in the backward direction,.
162 * from among the set of availability flr values calculated by the MEP in this Measurement Interval.
163 * There is one availability flr value for each 'delta_t' time period within
164 * the Measurement Interval, as specified in MEF 10.2.1.
165 * The flr value is a ratio that is expressed as a percent with a value of 0
166 * (ratio 0.00) through 100000 (ratio 1.00).
167 * @return The ratio as 1/1000th of a percent, where 1 indicates 0.001 percent
168 */
169 MilliPct backwardAverageFrameLossRatio();
170
171 /**
172 * Abstract builder for classes derived from LossAvailabilityStat.
173 * {@link org.onosproject.incubator.net.l2monitoring.soam.loss.LossAvailabilityStat}.
174 */
175 public interface LaStatBuilder {
176 LaStatBuilder forwardHighLoss(Long forwardHighLoss);
177
178 LaStatBuilder backwardHighLoss(Long backwardHighLoss);
179
180 LaStatBuilder forwardConsecutiveHighLoss(Long forwardConsecutiveHighLoss);
181
182 LaStatBuilder backwardConsecutiveHighLoss(Long backwardConsecutiveHighLoss);
183
184 LaStatBuilder forwardAvailable(Long forwardAvailable);
185
186 LaStatBuilder backwardAvailable(Long backwardAvailable);
187
188 LaStatBuilder forwardUnavailable(Long forwardUnavailable);
189
190 LaStatBuilder backwardUnavailable(Long backwardUnavailable);
191
192 LaStatBuilder forwardMinFrameLossRatio(MilliPct forwardMinFrameLossRatio);
193
194 LaStatBuilder forwardMaxFrameLossRatio(MilliPct forwardMaxFrameLossRatio);
195
196 LaStatBuilder forwardAverageFrameLossRatio(MilliPct forwardAverageFrameLossRatio);
197
198 LaStatBuilder backwardMinFrameLossRatio(MilliPct backwardMinFrameLossRatio);
199
200 LaStatBuilder backwardMaxFrameLossRatio(MilliPct backwardMaxFrameLossRatio);
201
202 LaStatBuilder backwardAverageFrameLossRatio(MilliPct backwardAverageFrameLossRatio);
203 }
204}