}
private final class BgpPeerSingletonService implements BGPPeerStateConsumer {
- private boolean activeConnection;
+ private final boolean activeConnection;
private final BGPDispatcher dispatcher;
private final InetSocketAddress inetAddress;
private final int retryTimer;
String peerGroupName = null;
final Config neighborConfig = neighbor.getConfig();
if (neighborConfig != null) {
- final NeighborPeerGroupConfig pgConfig = neighborConfig.getAugmentation(NeighborPeerGroupConfig.class);
+ final NeighborPeerGroupConfig pgConfig = neighborConfig.augmentation(NeighborPeerGroupConfig.class);
if (pgConfig != null) {
peerGroupName = StringUtils.substringBetween(pgConfig.getPeerGroup(), "=\"", "\"");
peerGroup = peerGroupLoader.getPeerGroup(bgpIid, peerGroupName);
neighborLocalAs = globalAs;
}
- this.bgpPeer = new BGPPeer(this.neighborAddress, peerGroupName, rib, role, clusterId, neighborLocalAs,
- BgpPeer.this.rpcRegistry, afiSafisAdvertized, Collections.emptySet());
+ this.bgpPeer = new BGPPeer(tableTypeRegistry, this.neighborAddress, peerGroupName, rib, role, clusterId,
+ neighborLocalAs, BgpPeer.this.rpcRegistry, afiSafisAdvertized, Collections.emptySet());
this.prefs = new BGPSessionPreferences(neighborLocalAs, hold, rib.getBgpIdentifier(),
neighborRemoteAs, bgpParameters, getPassword(keyMapping));
this.activeConnection = OpenConfigMappingUtil.isActive(neighbor, peerGroup);