/** * Creates the {@code REQUEST_FNF} frame. * * @param byteBufAllocator the {@code ByteBufAllocator} to use * @param follows whether to set the Follows flag * @param metadata the metadata * @param data the data * @return the {@code REQUEST_FNF} frame * @throws NullPointerException if {@code byteBufAllocator} is {@code null} */ public static RequestFireAndForgetFrame createRequestFireAndForgetFrame( ByteBufAllocator byteBufAllocator, boolean follows, @Nullable ByteBuf metadata, @Nullable ByteBuf data) { ByteBuf byteBuf = createFrameTypeAndFlags(byteBufAllocator, FrameType.REQUEST_FNF); if (follows) { byteBuf = setFollowsFlag(byteBuf); } byteBuf = appendMetadata(byteBufAllocator, byteBuf, metadata); byteBuf = appendData(byteBuf, data); return RECYCLER.get().setByteBuf(byteBuf); }
/** * Creates the {@code REQUEST_FNF} frame. * * @param byteBufAllocator the {@code ByteBufAllocator} to use * @param follows whether to set the Follows flag * @param metadata the metadata * @param data the data * @return the {@code REQUEST_FNF} frame * @throws NullPointerException if {@code byteBufAllocator} is {@code null} */ public static RequestFireAndForgetFrame createRequestFireAndForgetFrame( ByteBufAllocator byteBufAllocator, boolean follows, @Nullable ByteBuf metadata, @Nullable ByteBuf data) { ByteBuf byteBuf = createFrameTypeAndFlags(byteBufAllocator, FrameType.REQUEST_FNF); if (follows) { byteBuf = setFollowsFlag(byteBuf); } byteBuf = appendMetadata(byteBufAllocator, byteBuf, metadata); byteBuf = appendData(byteBuf, data); return RECYCLER.get().setByteBuf(byteBuf); }