2 * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.protocol.bgp.rib.impl.stats.rib.impl;
11 import java.util.concurrent.atomic.LongAdder;
12 import javax.annotation.Nonnull;
13 import javax.annotation.Nullable;
14 import org.opendaylight.controller.config.yang.bgp.rib.impl.BgpRenderState;
15 import org.opendaylight.protocol.bgp.rib.spi.state.BGPRIBState;
16 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.RibId;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.rib.TablesKey;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.BgpId;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.ClusterIdentifier;
25 public class RIBImplRuntimeMXBeanImpl implements BGPRenderStats {
26 private final BGPRenderStats renderStats;
28 public RIBImplRuntimeMXBeanImpl(@Nonnull final BgpId bgpId, @Nonnull final RibId ribId,
29 @Nonnull final AsNumber localAs, @Nullable final ClusterIdentifier clusterId,
30 @Nonnull final BGPRIBState globalState,
31 @Nonnull final Set<TablesKey> tablesKeys) {
32 this.renderStats = new BGPRenderStatsImpl(bgpId, ribId, localAs, clusterId, globalState, tablesKeys);
36 public BgpRenderState getBgpRenderState() {
37 return this.renderStats.getBgpRenderState();
41 public LongAdder getConfiguredPeerCounter() {
42 return this.renderStats.getConfiguredPeerCounter();
46 public LongAdder getConnectedPeerCounter() {
47 return this.renderStats.getConnectedPeerCounter();