cb1d8e959735a0dd05cadf45e59d79efe4ed848e
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / spi / RIBSupportContextRegistry.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.protocol.bgp.rib.impl.spi;
9
10 import javax.annotation.Nullable;
11 import org.opendaylight.protocol.bgp.rib.spi.RIBSupport;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.Route;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.Tables;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
16 import org.opendaylight.yangtools.yang.binding.ChildOf;
17 import org.opendaylight.yangtools.yang.binding.ChoiceIn;
18 import org.opendaylight.yangtools.yang.binding.DataObject;
19 import org.opendaylight.yangtools.yang.binding.Identifiable;
20 import org.opendaylight.yangtools.yang.binding.Identifier;
21 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
22
23 public interface RIBSupportContextRegistry {
24     /**
25      * Acquire a RIB Support for a AFI/SAFI combination.
26      *
27      * @param key AFI/SAFI key
28      * @return RIBSupport instance, or null if the AFI/SAFI is not implemented.
29      */
30     @Nullable
31     <C extends Routes & DataObject & ChoiceIn<Tables>, S extends ChildOf<? super C>,
32         R extends Route & ChildOf<? super S> & Identifiable<I>,
33         I extends Identifier<R>> RIBSupport<C, S, R, I> getRIBSupport(TablesKey key);
34
35     /**
36      * Acquire a RIB Support Context for a AFI/SAFI combination.
37      *
38      * @param key AFI/SAFI key
39      * @return RIBSupport instance, or null if the AFI/SAFI is not implemented.
40      */
41     @Nullable
42     RIBSupportContext getRIBSupportContext(TablesKey key);
43
44     /**
45      * Acquire a RIB Support Context for a AFI/SAFI combination.
46      *
47      * @param key Tables key with AFI/SAFI key
48      * @return RIBSupport instance, or null if the AFI/SAFI is not implemented.
49      */
50     @Nullable
51     RIBSupportContext getRIBSupportContext(NodeIdentifierWithPredicates key);
52 }