import com.google.common.primitives.UnsignedInteger;
import org.opendaylight.protocol.bgp.mode.api.BestPath;
-import org.opendaylight.protocol.bgp.mode.impl.OffsetMap;
import org.opendaylight.protocol.bgp.mode.spi.RouteEntryUtil;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
@Override
public int addRoute(final UnsignedInteger routerId, final Long remotePathId, final NodeIdentifier attrII, final NormalizedNode<?, ?> data) {
- final OffsetMap<UnsignedInteger> oldMap = getOffsets();
+ final OffsetMap oldMap = getOffsets();
final int offset = super.addRoute(routerId, remotePathId, attrII, data);
- final OffsetMap<UnsignedInteger> newMap = getOffsets();
+ final OffsetMap newMap = getOffsets();
if (!newMap.equals(oldMap)) {
this.values = newMap.expand(oldMap, this.values, offset);
@Override
public boolean removeRoute(final UnsignedInteger routerId, final Long remotePathId) {
- final OffsetMap<UnsignedInteger> map = getOffsets();
+ final OffsetMap map = getOffsets();
final int offset = map.offsetOf(routerId);
this.values = map.removeValue(this.values, offset);
return removeRoute(routerId, offset);
@Override
public MapEntryNode createValue(final PathArgument routeId, final BestPath path) {
- final OffsetMap<UnsignedInteger> map = getOffsets();
+ final OffsetMap map = getOffsets();
final MapEntryNode mapValues = map.getValue(this.values, map.offsetOf(path.getRouterId()));
return RouteEntryUtil.createComplexRouteValue(routeId, path, mapValues);
}