*/
package org.opendaylight.protocol.bgp.rib.impl;
+import io.netty.channel.FixedRecvByteBufAllocator;
import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
/**
private static final int EXTENDED_MAX_FRAME_SIZE = 65535;
+ // Allocators
+ private static final FixedRecvByteBufAllocator RECV_ALLOCATOR = new FixedRecvByteBufAllocator(MAX_FRAME_SIZE);
+ private static final FixedRecvByteBufAllocator EXTENDED_RECV_ALLOCATOR =
+ new FixedRecvByteBufAllocator(EXTENDED_MAX_FRAME_SIZE);
+
/*
0 1 2 3
super(maxFrameSize, MARKER_SIZE, LENGTH_SIZE, -MARKER_SIZE - LENGTH_SIZE, 0);
}
+ static FixedRecvByteBufAllocator getRecvAllocator() {
+ return RECV_ALLOCATOR;
+ }
+
+ static FixedRecvByteBufAllocator getExtendedRecvAllocator() {
+ return EXTENDED_RECV_ALLOCATOR;
+ }
+
static BGPMessageHeaderDecoder getBGPMessageHeaderDecoder() {
return new BGPMessageHeaderDecoder(MAX_FRAME_SIZE);
}
static BGPMessageHeaderDecoder getExtendedBGPMessageHeaderDecoder() {
return new BGPMessageHeaderDecoder(EXTENDED_MAX_FRAME_SIZE);
}
-
-
}