Reduce number of parameters for path selection
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / RouteEntryDependenciesContainerImpl.java
1 /*
2  * Copyright (c) 2018 AT&T Intellectual Property. 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;
9
10 import static java.util.Objects.requireNonNull;
11
12 import org.opendaylight.protocol.bgp.rib.spi.ExportPolicyPeerTracker;
13 import org.opendaylight.protocol.bgp.rib.spi.RIBSupport;
14 import org.opendaylight.protocol.bgp.rib.spi.entry.RouteEntryDependenciesContainer;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.rib.TablesKey;
16 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
17
18 public final class RouteEntryDependenciesContainerImpl implements RouteEntryDependenciesContainer {
19     private final RIBSupport ribSupport;
20     private final TablesKey tablesKey;
21     private final YangInstanceIdentifier locRibTarget;
22     private final ExportPolicyPeerTracker exportPolicyPeerTracker;
23
24     public RouteEntryDependenciesContainerImpl(
25             final RIBSupport ribSupport,
26             final TablesKey tablesKey,
27             final YangInstanceIdentifier locRibTarget, final ExportPolicyPeerTracker exportPolicyPeerTracker) {
28         this.ribSupport = requireNonNull(ribSupport);
29         this.tablesKey = requireNonNull(tablesKey);
30         this.locRibTarget = requireNonNull(locRibTarget);
31         this.exportPolicyPeerTracker = requireNonNull(exportPolicyPeerTracker);
32     }
33
34     @Override
35     public RIBSupport getRibSupport() {
36         return this.ribSupport;
37     }
38
39     @Override
40     public TablesKey getLocalTablesKey() {
41         return this.tablesKey;
42     }
43
44     @Override
45     public YangInstanceIdentifier getLocRibTableTarget() {
46         return this.locRibTarget;
47     }
48
49     @Override
50     public ExportPolicyPeerTracker getExportPolicyPeerTracker() {
51         return exportPolicyPeerTracker;
52     }
53 }