return buffer.toString();
}
- public static final int readNlriLength(@Nonnull final ByteBuf nlri) {
+ public static int readNlriLength(@Nonnull final ByteBuf nlri) {
requireNonNull(nlri, "NLRI information cannot be null");
Preconditions.checkState(nlri.isReadable(), "NLRI Byte buffer is not readable.");
int length = nlri.readUnsignedByte();
}
@Nullable
- protected static final PathId readPathId(@Nonnull final ByteBuf nlri, final Class<? extends AddressFamily> afi,
+ protected static PathId readPathId(@Nonnull final ByteBuf nlri, final Class<? extends AddressFamily> afi,
final Class<? extends SubsequentAddressFamily> safi, final PeerSpecificParserConstraint constraint) {
if (MultiPathSupportUtil.isTableTypeSupported(constraint, new BgpTableTypeImpl(afi, safi))) {
return PathIdUtil.readPathId(nlri);
private static final int LENGTH_BITMASK = 48;
@VisibleForTesting
- public static final short parseLength(final byte op) {
+ public static short parseLength(final byte op) {
return (short) (1 << ((op & LENGTH_BITMASK) >> LENGTH_SHIFT));
}
private FlowspecIpv4NlriParserHelper() {}
- public static final void extractFlowspec(final ChoiceNode fsType, final FlowspecBuilder fsBuilder) {
+ public static void extractFlowspec(final ChoiceNode fsType, final FlowspecBuilder fsBuilder) {
if (fsType.getChild(AbstractFlowspecNlriParser.DEST_PREFIX_NID).isPresent()) {
fsBuilder.setFlowspecType(
new DestinationPrefixCaseBuilder()
}
}
- public static final void buildFlowspecString(final FlowspecType value, final StringBuilder buffer) {
+ public static void buildFlowspecString(final FlowspecType value, final StringBuilder buffer) {
if (value instanceof DestinationPrefixCase) {
buffer.append("to ");
buffer.append(((DestinationPrefixCase) value).getDestinationPrefix().getValue());
}
}
- private static final List<ProtocolIps> createProtocolsIps(final UnkeyedListNode protocolIpsData) {
+ private static List<ProtocolIps> createProtocolsIps(final UnkeyedListNode protocolIpsData) {
final List<ProtocolIps> protocolIps = new ArrayList<>();
for (final UnkeyedListEntryNode node : protocolIpsData.getValue()) {
private FlowspecIpv6NlriParserHelper() {}
- public static final void extractFlowspec(final ChoiceNode fsType, final FlowspecBuilder fsBuilder) {
+ public static void extractFlowspec(final ChoiceNode fsType, final FlowspecBuilder fsBuilder) {
if (fsType.getChild(AbstractFlowspecNlriParser.DEST_PREFIX_NID).isPresent()) {
fsBuilder.setFlowspecType(
new DestinationIpv6PrefixCaseBuilder()
}
}
- public static final void buildFlowspecString(final FlowspecType value, final StringBuilder buffer) {
+ public static void buildFlowspecString(final FlowspecType value, final StringBuilder buffer) {
if (value instanceof DestinationIpv6PrefixCase) {
buffer.append("to ");
buffer.append(((DestinationIpv6PrefixCase) value).getDestinationPrefix().getValue());
}
}
- private static final List<NextHeaders> createNextHeaders(final UnkeyedListNode nextHeadersData) {
+ private static List<NextHeaders> createNextHeaders(final UnkeyedListNode nextHeadersData) {
final List<NextHeaders> nextHeaders = new ArrayList<>();
for (final UnkeyedListEntryNode node : nextHeadersData.getValue()) {
return nextHeaders;
}
- private static final List<FlowLabel> createFlowLabels(final UnkeyedListNode flowLabelsData) {
+ private static List<FlowLabel> createFlowLabels(final UnkeyedListNode flowLabelsData) {
final List<FlowLabel> flowLabels = new ArrayList<>();
for (final UnkeyedListEntryNode node : flowLabelsData.getValue()) {
return flowLabels;
}
- private static final String stringFlowLabel(final List<FlowLabel> list) {
+ private static String stringFlowLabel(final List<FlowLabel> list) {
final StringBuilder buffer = new StringBuilder();
boolean isFirst = true;
for (final FlowLabel item : list) {
import org.opendaylight.yangtools.yang.common.QName;
abstract class AbstractNodeDescriptorTlvCodec {
- protected static final NodeIdentifier parseNodeDescriptor(final ByteBuf value, final Map<QName, Object> parsedSubTlvs) {
+ protected static NodeIdentifier parseNodeDescriptor(final ByteBuf value, final Map<QName, Object> parsedSubTlvs) {
parsedSubTlvs.putAll(SimpleNlriTypeRegistry.getInstance().parseSubTlvs(value));
final AsNumber asNumber = (AsNumber) parsedSubTlvs.get(AsNumTlvParser.AS_NUMBER_QNAME);
final DomainIdentifier domainId = (DomainIdentifier) parsedSubTlvs.get(DomainIdTlvParser.DOMAIN_ID_QNAME);
};
}
- protected static final void serializeNodeDescriptor(final NodeIdentifier tlv, final ByteBuf body) {
+ protected static void serializeNodeDescriptor(final NodeIdentifier tlv, final ByteBuf body) {
final SimpleNlriTypeRegistry tlvReg = SimpleNlriTypeRegistry.getInstance();
tlvReg.serializeTlv(AsNumTlvParser.AS_NUMBER_QNAME, tlv.getAsNumber(), body);
tlvReg.serializeTlv(DomainIdTlvParser.DOMAIN_ID_QNAME, tlv.getDomainId(), body);
protected static final NodeIdentifier ROUTES_IDENTIFIER = new NodeIdentifier(Routes.QNAME);
private static final Logger LOG = LoggerFactory.getLogger(AbstractRouteEntry.class);
- protected static final void fillLocRib(final YangInstanceIdentifier routeTarget, final NormalizedNode<?, ?> value,
+ protected static void fillLocRib(final YangInstanceIdentifier routeTarget, final NormalizedNode<?, ?> value,
final DOMDataWriteTransaction tx) {
if (value != null) {
LOG.debug("Write route to LocRib {}", value);
}
}
- protected static final void update(final PeerId destPeer, final YangInstanceIdentifier routeTarget,
+ protected static void update(final PeerId destPeer, final YangInstanceIdentifier routeTarget,
final ContainerNode effAttr, final NormalizedNode<?, ?> value, final RIBSupport ribSup,
final DOMDataWriteTransaction tx) {
if (!writeRoute(destPeer, routeTarget, effAttr, value, ribSup, tx)) {
}
}
- protected static final boolean writeRoute(final PeerId destPeer, final YangInstanceIdentifier routeTarget,
+ protected static boolean writeRoute(final PeerId destPeer, final YangInstanceIdentifier routeTarget,
final ContainerNode effAttrib, final NormalizedNode<?, ?> value, final RIBSupport ribSup,
final DOMDataWriteTransaction tx) {
if (effAttrib != null && value != null) {
tx.delete(LogicalDatastoreType.OPERATIONAL, routeTarget);
}
- protected static final boolean filterRoutes(final PeerId rootPeer, final PeerId destPeer,
+ protected static boolean filterRoutes(final PeerId rootPeer, final PeerId destPeer,
final ExportPolicyPeerTracker peerPT, final TablesKey localTK, final PeerRole destPeerRole) {
return !rootPeer.equals(destPeer) && isTableSupportedAndReady(destPeer, peerPT, localTK) && !PeerRole.Internal.equals(destPeerRole);
}
return true;
}
- protected static final YangInstanceIdentifier getAdjRibOutYII(final RIBSupport ribSup,
+ protected static YangInstanceIdentifier getAdjRibOutYII(final RIBSupport ribSup,
final YangInstanceIdentifier rootPath, final PathArgument routeId, final TablesKey localTK) {
return ribSup.routePath(rootPath.node(AdjRibOut.QNAME).node(Tables.QNAME).node(RibSupportUtils.toYangTablesKey(localTK))
.node(ROUTES_IDENTIFIER), routeId);
* @param attributes Input attributes, may not be null.
* @return Modified (reflected) attributes.
*/
- @Nonnull protected static final ContainerNode reflectedFromInternalAttributes(@Nonnull final ContainerNode attributes) {
+ @Nonnull protected static ContainerNode reflectedFromInternalAttributes(@Nonnull final ContainerNode attributes) {
return AttributeOperations.getInstance(attributes).reflectedAttributes(attributes);
}
}
final DOMDataWriteTransaction t = this.domChain.newWriteOnlyTransaction();
t.delete(LogicalDatastoreType.OPERATIONAL, getYangRibId());
- final CheckedFuture<Void, TransactionCommitFailedException> cleanFuture = t.submit();
+ final ListenableFuture<Void> cleanFuture = t.submit();
this.domChain.close();
return cleanFuture;
import com.google.common.annotations.Beta;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology;
import org.opendaylight.yangtools.concepts.AbstractRegistration;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@Beta
public interface BgpTopologyDeployer {
return attribBuilder.build();
}
- private static final List<Communities> createCommunities() {
+ private static List<Communities> createCommunities() {
final List<Communities> communities = Lists.newArrayList();
final CommunitiesBuilder commBuilder = new CommunitiesBuilder()
.setAsNumber(new AsNumber(65535L))
}
}
- private TerminationReason(final short value) {
+ TerminationReason(final short value) {
this.value = value;
}
}
}
- protected static final List<VendorInformationObject> addVendorInformationObjects(final List<Object> objects) {
+ protected static List<VendorInformationObject> addVendorInformationObjects(final List<Object> objects) {
final List<VendorInformationObject> vendorInfo = new ArrayList<>();
while (!objects.isEmpty() && objects.get(0) instanceof VendorInformationObject) {
final VendorInformationObject viObject = (VendorInformationObject) objects.get(0);
return VALUE_MAP.get(new PCEPErrorIdentifier(errorType, errorValue));
}
- private PCEPErrors(final int type, final int value) {
+ PCEPErrors(final int type, final int value) {
this.errorId = new PCEPErrorIdentifier((short) type, (short) value);
}