2 * Copyright (c) 2015 Cisco 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.mode.impl.base;
10 import com.google.common.primitives.UnsignedInteger;
11 import org.opendaylight.protocol.bgp.rib.spi.BGPPeerTracker;
12 import org.opendaylight.protocol.bgp.rib.spi.RIBSupport;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev171207.Route;
14 import org.opendaylight.yangtools.yang.binding.Identifier;
16 final class SimpleRouteEntry extends BaseAbstractRouteEntry {
17 SimpleRouteEntry(final BGPPeerTracker peerTracker) {
22 public Route createRoute(final RIBSupport ribSup, final Identifier routeKey, final long pathId,
23 final BaseBestPath path) {
24 return ribSup.createRoute(null, routeKey, pathId, path.getAttributes());
28 public boolean removeRoute(UnsignedInteger routerId, final long remotePathId) {
29 return removeRoute(routerId, getOffsets().offsetOf(routerId));