mohamed rahil | 8ea09d4 | 2016-04-19 20:47:21 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Foundation |
mohamed rahil | 8ea09d4 | 2016-04-19 20:47:21 +0530 | [diff] [blame] | 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.isis.controller; |
| 17 | |
| 18 | /** |
| 19 | * Representation of an ISIS link state database aging. |
| 20 | */ |
| 21 | public interface IsisLsdbAge { |
| 22 | |
| 23 | /** |
| 24 | * Starts the aging timer thread which gets invokes every second. |
| 25 | */ |
| 26 | void startDbAging(); |
| 27 | |
| 28 | /** |
| 29 | * Returns the age counter. |
| 30 | * |
| 31 | * @return age counter |
| 32 | */ |
| 33 | int ageCounter(); |
| 34 | |
| 35 | /** |
| 36 | * Returns the age counter rollover. |
| 37 | * |
| 38 | * @return age counter rollover |
| 39 | */ |
| 40 | int ageCounterRollOver(); |
| 41 | |
| 42 | /** |
| 43 | * Returns the bin number. |
| 44 | * |
| 45 | * @param x can be either age or ageCounter |
| 46 | * @return bin number |
| 47 | */ |
| 48 | int age2Bin(int x); |
| 49 | |
| 50 | /** |
| 51 | * Returns the LSP bin instance. |
| 52 | * |
| 53 | * @param binKey key to search |
| 54 | * @return LSP bin instance |
| 55 | */ |
| 56 | IsisLspBin getLspBin(int binKey); |
| 57 | |
| 58 | /** |
| 59 | * Adds LSP to bin. |
| 60 | * |
| 61 | * @param binNumber key to store in bin |
| 62 | * @param lspBin LSP bin instance |
| 63 | */ |
| 64 | void addLspBin(int binNumber, IsisLspBin lspBin); |
| 65 | |
| 66 | /** |
| 67 | * Removes LSP from bin. |
| 68 | * |
| 69 | * @param lspWrapper LSP wrapper instance |
| 70 | */ |
| 71 | void removeLspFromBin(LspWrapper lspWrapper); |
sunish vk | 7bdf4d4 | 2016-06-24 12:29:43 +0530 | [diff] [blame] | 72 | } |