import org.opendaylight.protocol.bgp.openconfig.spi.BGPConfigModuleTracker;
import org.opendaylight.protocol.bgp.rib.impl.spi.RIB;
import org.opendaylight.protocol.bgp.rib.impl.spi.RIBSupportContextRegistry;
+import org.opendaylight.protocol.bgp.rib.impl.stats.peer.BGPPeerStats;
+import org.opendaylight.protocol.bgp.rib.impl.stats.peer.BGPPeerStatsImpl;
import org.opendaylight.protocol.bgp.rib.spi.ExportPolicyPeerTracker;
import org.opendaylight.protocol.bgp.rib.spi.IdentifierUtils;
import org.opendaylight.protocol.bgp.rib.spi.RouterIds;
private DOMTransactionChain writerChain;
private EffectiveRibInWriter effectiveRibInWriter;
private AdjRibInWriter adjRibInWriter;
+ private BGPPeerStats peerStats;
public ApplicationPeer(final ApplicationRibId applicationRibId, final Ipv4Address ipAddress, final RIB rib,
final BGPConfigModuleTracker moduleTracker) {
this.adjRibInWriter = AdjRibInWriter.create(this.rib.getYangRibId(), PeerRole.Internal, simpleRoutingPolicy, this.writerChain);
final RIBSupportContextRegistry context = this.rib.getRibSupportContext();
this.adjRibInWriter = this.adjRibInWriter.transform(peerId, context, localTables, Collections.emptyMap());
- //TODO need to create effective rib in adjRibInWriter with route counter here
+ this.peerStats = new BGPPeerStatsImpl(this.name, localTables);
this.effectiveRibInWriter = EffectiveRibInWriter.create(this.rib.getService(), this.rib.createPeerChain(this), this.peerIId,
- this.rib.getImportPolicyPeerTracker(), context, PeerRole.Internal);
+ this.rib.getImportPolicyPeerTracker(), context, PeerRole.Internal, this.peerStats.getEffectiveRibInRouteCounters(),
+ this.peerStats.getAdjRibInRouteCounters());
if (moduleTracker != null) {
moduleTracker.onInstanceCreate();
}