Search in sources :

Example 1 with DataStreamRequestFilePositionCount

use of org.apache.ratis.datastream.impl.DataStreamRequestFilePositionCount in project incubator-ratis by apache.

the class NettyDataStreamUtils method encodeDataStreamRequestFilePositionCount.

static void encodeDataStreamRequestFilePositionCount(DataStreamRequestFilePositionCount request, Consumer<Object> out, ByteBufAllocator allocator) {
    encodeDataStreamRequestHeader(request, out, allocator);
    final FilePositionCount f = request.getFile();
    out.accept(new DefaultFileRegion(f.getFile(), f.getPosition(), f.getCount()));
}
Also used : DefaultFileRegion(org.apache.ratis.thirdparty.io.netty.channel.DefaultFileRegion) DataStreamRequestFilePositionCount(org.apache.ratis.datastream.impl.DataStreamRequestFilePositionCount) FilePositionCount(org.apache.ratis.io.FilePositionCount)

Aggregations

DataStreamRequestFilePositionCount (org.apache.ratis.datastream.impl.DataStreamRequestFilePositionCount)1 FilePositionCount (org.apache.ratis.io.FilePositionCount)1 DefaultFileRegion (org.apache.ratis.thirdparty.io.netty.channel.DefaultFileRegion)1