Reduce number of parameters for path selection
[bgpcep.git] / bgp / path-selection-mode / src / main / java / org / opendaylight / protocol / bgp / mode / impl / base / BaseSimpleRouteEntry.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.protocol.bgp.mode.impl.base;
9
10 import com.google.common.primitives.UnsignedInteger;
11 import org.opendaylight.protocol.bgp.mode.spi.RouteEntryUtil;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
13 import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
14
15 final class BaseSimpleRouteEntry extends BaseAbstractRouteEntry {
16     @Override
17     public boolean removeRoute(UnsignedInteger routerId, final Long remotePathId) {
18         return removeRoute(routerId, getOffsets().offsetOf(routerId));
19     }
20
21     @Override
22     public MapEntryNode createValue(final NodeIdentifierWithPredicates routeId, final BaseBestPath path) {
23         return RouteEntryUtil.createSimpleRouteValue(routeId, path);
24     }
25 }