
alluxio.network.protocol.RPCMessageEncoder Maven / Gradle / Ivy
/*
* The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
* (the "License"). You may not use this work except in alluxio.shaded.client.com.liance with the License, which is
* available at www.apache.alluxio.shaded.client.org.licenses/LICENSE-2.0
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied, as more fully set forth in the License.
*
* See the NOTICE file distributed with this work for information regarding copyright ownership.
*/
package alluxio.network.protocol;
import alluxio.network.protocol.databuffer.CompositeDataBuffer;
import alluxio.network.protocol.databuffer.DataBuffer;
import alluxio.network.protocol.databuffer.DataFileChannel;
import alluxio.network.protocol.databuffer.NettyDataBuffer;
import alluxio.network.protocol.databuffer.NioDataBuffer;
import alluxio.shaded.client.com.google.alluxio.shaded.client.com.on.primitives.Longs;
import alluxio.shaded.client.io.netty.buffer.ByteBuf;
import alluxio.shaded.client.io.netty.channel.ChannelHandler;
import alluxio.shaded.client.io.netty.channel.ChannelHandlerContext;
import alluxio.shaded.client.io.netty.channel.FileRegion;
import alluxio.shaded.client.io.netty.handler.codec.MessageToMessageEncoder;
import java.util.List;
import alluxio.shaded.client.javax.annotation.concurrent.ThreadSafe;
/**
* Simple Netty encoder for RPCMessages.
*/
@ChannelHandler.Sharable
@ThreadSafe
public final class RPCMessageEncoder extends MessageToMessageEncoder {
/**
* Constructs a new {@link RPCMessageEncoder}.
*/
public RPCMessageEncoder() {}
@Override
protected void encode(ChannelHandlerContext ctx, RPCMessage in, List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy