blob: 6d398c42e9b7823f0249b720e98ac3b5522a7e71 [file] [log] [blame]
sunish vk30637eb2016-02-16 15:19:32 +05301/*
2 * Copyright 2016 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 */
16package org.onosproject.ospf.controller;
17
18import java.util.List;
19
20/**
21 * Represents an OSPF link state database.
22 */
23public interface OspfLsdb {
24
25 /**
26 * Initializes the link state database.
27 */
28 public void initializeDb();
29
30 /**
31 * Gets all LSA headers.
32 *
33 * @param excludeMaxAgeLsa exclude the max age LSAs
34 * @param isOpaqueCapable is opaque capable or not
35 * @return List of LSA headers
36 */
37 public List getAllLsaHeaders(boolean excludeMaxAgeLsa, boolean isOpaqueCapable);
38
39 /**
40 * Finds the LSA from appropriate LSA maps.
41 *
42 * @param lsType type of LSA
43 * @param lsaKey key
44 * @return LSA wrapper object
45 */
46 public LsaWrapper findLsa(int lsType, String lsaKey);
47
48 /**
49 * Adds the LSA to maxAge bin.
50 *
51 * @param key key
52 * @param lsaWrapper LSA wrapper instance
53 */
54 public void addLsaToMaxAgeBin(String key, Object lsaWrapper);
55
56 /**
57 * Removes LSA from bin.
58 *
59 * @param lsaWrapper LSA wrapper instance
60 */
61 public void removeLsaFromBin(Object lsaWrapper);
62}