Sean Condon | 0e89bda | 2017-03-21 14:23:19 +0000 | [diff] [blame^] | 1 | /* |
| 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 | */ |
| 16 | package org.onosproject.incubator.net.l2monitoring.cfm; |
| 17 | |
| 18 | /** |
| 19 | * An extension of the MepEntry for Loopback state attributes. |
| 20 | * |
| 21 | */ |
| 22 | public interface MepLbEntry { |
| 23 | /** |
| 24 | * Get the next Loopback Transaction Identifier to be sent in an LBM. |
| 25 | * LBM = LoopBack Message |
| 26 | * @return The next Loopback Transaction Identifier to be sent in an LBM |
| 27 | */ |
| 28 | long nextLbmIdentifier(); |
| 29 | |
| 30 | /** |
| 31 | * Get the total number of LBRs transmitted by this Mep. |
| 32 | * @return The total number of LBRs transmitted |
| 33 | */ |
| 34 | long countLbrTransmitted(); |
| 35 | |
| 36 | /** |
| 37 | * Get the total number of LBRs received by this Mep. |
| 38 | * @return The total number of LBRs received |
| 39 | */ |
| 40 | long countLbrReceived(); |
| 41 | |
| 42 | /** |
| 43 | * Get the total number of valid, in-order LBRs received. |
| 44 | * @return The total number of valid, in-order LBRs received |
| 45 | */ |
| 46 | long countLbrValidInOrder(); |
| 47 | |
| 48 | /** |
| 49 | * Get the total number of valid, out-of-order LBRs received. |
| 50 | * @return The total number of valid, out-of-order LBRs received |
| 51 | */ |
| 52 | long countLbrValidOutOfOrder(); |
| 53 | |
| 54 | /** |
| 55 | * Get the total number of LBRs received whose mac_service_data_unit did not match LBM. |
| 56 | * @return the total number of LBRs received whose mac_service_data_unit did not match LBM |
| 57 | */ |
| 58 | long countLbrMacMisMatch(); |
| 59 | |
| 60 | /** |
| 61 | * Builder for {@link org.onosproject.incubator.net.l2monitoring.cfm.MepLbEntry}. |
| 62 | */ |
| 63 | interface MepLbEntryBuilder { |
| 64 | MepLbEntryBuilder nextLbmIdentifier(long nextLbmIdentifier); |
| 65 | |
| 66 | MepLbEntryBuilder countLbrTransmitted(long countLbrTransmitted); |
| 67 | |
| 68 | MepLbEntryBuilder countLbrReceived(long countLbrRecieved); |
| 69 | |
| 70 | MepLbEntryBuilder countLbrValidInOrder(long countLbrValidInOrder); |
| 71 | |
| 72 | MepLbEntryBuilder countLbrValidOutOfOrder(long countLbrValidOutOfOrder); |
| 73 | |
| 74 | MepLbEntryBuilder countLbrMacMisMatch(long countLbrMacMisMatch); |
| 75 | |
| 76 | MepLbEntry build(); |
| 77 | } |
| 78 | } |