class org.apache.drill.exec.rpc.RpcEncoder extends io.netty.handler.codec.MessageToMessageEncoder
{
final org.slf4j.Logger logger;
static final int HEADER_TAG;
static final int PROTOBUF_BODY_TAG;
static final int RAW_BODY_TAG;
static final int HEADER_TAG_LENGTH;
static final int PROTOBUF_BODY_TAG_LENGTH;
static final int RAW_BODY_TAG_LENGTH;
public void <init>(java.lang.String)
{
org.slf4j.Logger v;
java.lang.Class v;
java.lang.String v, v, v;
org.apache.drill.exec.rpc.RpcEncoder v;
v := @this: org.apache.drill.exec.rpc.RpcEncoder;
v := @parameter: java.lang.String;
specialinvoke v.<io.netty.handler.codec.MessageToMessageEncoder: void <init>()>();
v = class "Lorg/apache/drill/exec/rpc/RpcEncoder;";
v = virtualinvoke v.<java.lang.Class: java.lang.String getCanonicalName()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String,java.lang.String)>(v, v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u0001-\u0001");
v = staticinvoke <org.slf4j.LoggerFactory: org.slf4j.Logger getLogger(java.lang.String)>(v);
v.<org.apache.drill.exec.rpc.RpcEncoder: org.slf4j.Logger logger> = v;
return;
}
protected void encode(io.netty.channel.ChannelHandlerContext, org.apache.drill.exec.rpc.OutboundRpcMessage, java.util.List) throws java.lang.Exception
{
io.netty.buffer.ByteBufAllocator v, v;
org.apache.drill.exec.proto.GeneralRPCProtos$RpcMode v;
org.apache.drill.exec.proto.GeneralRPCProtos$RpcHeader v;
boolean v;
io.netty.buffer.ByteBuf[] v, v;
io.netty.buffer.ByteBufOutputStream v;
io.netty.buffer.CompositeByteBuf v;
java.util.List v;
org.apache.drill.exec.proto.GeneralRPCProtos$RpcHeader$Builder v, v, v, v;
org.apache.drill.exec.rpc.RpcEncoder v;
io.netty.channel.ChannelHandlerContext v;
io.netty.buffer.ByteBuf v, v;
org.apache.drill.exec.rpc.OutboundRpcMessage v;
int v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
com.google.protobuf.CodedOutputStream v;
org.slf4j.Logger v;
io.netty.channel.Channel v;
com.google.protobuf.MessageLite v, v;
v := @this: org.apache.drill.exec.rpc.RpcEncoder;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v := @parameter: org.apache.drill.exec.rpc.OutboundRpcMessage;
v := @parameter: java.util.List;
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.channel.Channel channel()>();
v = interfaceinvoke v.<io.netty.channel.Channel: boolean isOpen()>();
if v != 0 goto label;
v = v.<org.apache.drill.exec.rpc.RpcEncoder: org.slf4j.Logger logger>;
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String)>("Channel closed, skipping encode.");
virtualinvoke v.<org.apache.drill.exec.rpc.OutboundRpcMessage: void release()>();
return;
label:
v = staticinvoke <org.apache.drill.exec.proto.GeneralRPCProtos$RpcHeader: org.apache.drill.exec.proto.GeneralRPCProtos$RpcHeader$Builder newBuilder()>();
v = v.<org.apache.drill.exec.rpc.OutboundRpcMessage: org.apache.drill.exec.proto.GeneralRPCProtos$RpcMode mode>;
v = virtualinvoke v.<org.apache.drill.exec.proto.GeneralRPCProtos$RpcHeader$Builder: org.apache.drill.exec.proto.GeneralRPCProtos$RpcHeader$Builder setMode(org.apache.drill.exec.proto.GeneralRPCProtos$RpcMode)>(v);
v = v.<org.apache.drill.exec.rpc.OutboundRpcMessage: int coordinationId>;
v = virtualinvoke v.<org.apache.drill.exec.proto.GeneralRPCProtos$RpcHeader$Builder: org.apache.drill.exec.proto.GeneralRPCProtos$RpcHeader$Builder setCoordinationId(int)>(v);
v = v.<org.apache.drill.exec.rpc.OutboundRpcMessage: int rpcType>;
v = virtualinvoke v.<org.apache.drill.exec.proto.GeneralRPCProtos$RpcHeader$Builder: org.apache.drill.exec.proto.GeneralRPCProtos$RpcHeader$Builder setRpcType(int)>(v);
v = virtualinvoke v.<org.apache.drill.exec.proto.GeneralRPCProtos$RpcHeader$Builder: org.apache.drill.exec.proto.GeneralRPCProtos$RpcHeader build()>();
v = virtualinvoke v.<org.apache.drill.exec.proto.GeneralRPCProtos$RpcHeader: int getSerializedSize()>();
v = v.<org.apache.drill.exec.rpc.OutboundRpcMessage: com.google.protobuf.MessageLite pBody>;
v = interfaceinvoke v.<com.google.protobuf.MessageLite: int getSerializedSize()>();
v = virtualinvoke v.<org.apache.drill.exec.rpc.OutboundRpcMessage: int getRawBodySize()>();
v = <org.apache.drill.exec.rpc.RpcEncoder: int HEADER_TAG_LENGTH>;
v = staticinvoke <org.apache.drill.exec.rpc.RpcEncoder: int getRawVarintSize(int)>(v);
v = v + v;
v = v + v;
v = <org.apache.drill.exec.rpc.RpcEncoder: int PROTOBUF_BODY_TAG_LENGTH>;
v = v + v;
v = staticinvoke <org.apache.drill.exec.rpc.RpcEncoder: int getRawVarintSize(int)>(v);
v = v + v;
v = v + v;
if v <= 0 goto label;
v = <org.apache.drill.exec.rpc.RpcEncoder: int RAW_BODY_TAG_LENGTH>;
v = staticinvoke <org.apache.drill.exec.rpc.RpcEncoder: int getRawVarintSize(int)>(v);
v = v + v;
v = v + v;
v = v + v;
label:
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.buffer.ByteBufAllocator alloc()>();
v = interfaceinvoke v.<io.netty.buffer.ByteBufAllocator: io.netty.buffer.ByteBuf buffer()>();
v = new io.netty.buffer.ByteBufOutputStream;
specialinvoke v.<io.netty.buffer.ByteBufOutputStream: void <init>(io.netty.buffer.ByteBuf)>(v);
v = staticinvoke <com.google.protobuf.CodedOutputStream: com.google.protobuf.CodedOutputStream newInstance(java.io.OutputStream)>(v);
virtualinvoke v.<com.google.protobuf.CodedOutputStream: void writeRawVarint32(int)>(v);
v = <org.apache.drill.exec.rpc.RpcEncoder: int HEADER_TAG>;
virtualinvoke v.<com.google.protobuf.CodedOutputStream: void writeRawVarint32(int)>(v);
virtualinvoke v.<com.google.protobuf.CodedOutputStream: void writeRawVarint32(int)>(v);
virtualinvoke v.<org.apache.drill.exec.proto.GeneralRPCProtos$RpcHeader: void writeTo(com.google.protobuf.CodedOutputStream)>(v);
v = <org.apache.drill.exec.rpc.RpcEncoder: int PROTOBUF_BODY_TAG>;
virtualinvoke v.<com.google.protobuf.CodedOutputStream: void writeRawVarint32(int)>(v);
virtualinvoke v.<com.google.protobuf.CodedOutputStream: void writeRawVarint32(int)>(v);
v = v.<org.apache.drill.exec.rpc.OutboundRpcMessage: com.google.protobuf.MessageLite pBody>;
interfaceinvoke v.<com.google.protobuf.MessageLite: void writeTo(com.google.protobuf.CodedOutputStream)>(v);
v = virtualinvoke v.<org.apache.drill.exec.rpc.OutboundRpcMessage: int getRawBodySize()>();
if v <= 0 goto label;
v = <org.apache.drill.exec.rpc.RpcEncoder: int RAW_BODY_TAG>;
virtualinvoke v.<com.google.protobuf.CodedOutputStream: void writeRawVarint32(int)>(v);
virtualinvoke v.<com.google.protobuf.CodedOutputStream: void writeRawVarint32(int)>(v);
virtualinvoke v.<com.google.protobuf.CodedOutputStream: void flush()>();
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.buffer.ByteBufAllocator alloc()>();
v = v.<org.apache.drill.exec.rpc.OutboundRpcMessage: io.netty.buffer.ByteBuf[] dBodies>;
v = lengthof v;
v = v + 1;
v = interfaceinvoke v.<io.netty.buffer.ByteBufAllocator: io.netty.buffer.CompositeByteBuf compositeBuffer(int)>(v);
virtualinvoke v.<io.netty.buffer.CompositeByteBuf: io.netty.buffer.CompositeByteBuf addComponent(io.netty.buffer.ByteBuf)>(v);
v = virtualinvoke v.<io.netty.buffer.ByteBuf: int readableBytes()>();
v = v.<org.apache.drill.exec.rpc.OutboundRpcMessage: io.netty.buffer.ByteBuf[] dBodies>;
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
virtualinvoke v.<io.netty.buffer.CompositeByteBuf: io.netty.buffer.CompositeByteBuf addComponent(io.netty.buffer.ByteBuf)>(v);
v = virtualinvoke v.<io.netty.buffer.ByteBuf: int readableBytes()>();
v = v + v;
v = v + 1;
goto label;
label:
virtualinvoke v.<io.netty.buffer.CompositeByteBuf: io.netty.buffer.CompositeByteBuf writerIndex(int)>(v);
interfaceinvoke v.<java.util.List: boolean add(java.lang.Object)>(v);
goto label;
label:
virtualinvoke v.<com.google.protobuf.CodedOutputStream: void flush()>();
interfaceinvoke v.<java.util.List: boolean add(java.lang.Object)>(v);
label:
return;
}
static int makeTag(int, int)
{
int v, v, v, v;
v := @parameter: int;
v := @parameter: int;
v = v << 3;
v = v | v;
return v;
}
public static int getRawVarintSize(int)
{
int v, v, v, v, v;
v := @parameter: int;
v = 0;
label:
v = (int) -128;
v = v & v;
if v != 0 goto label;
v = v + 1;
return v;
label:
v = v + 1;
v = v >>> 7;
goto label;
}
static void <clinit>()
{
int v, v, v, v, v, v, v, v, v;
v = staticinvoke <org.apache.drill.exec.rpc.RpcEncoder: int makeTag(int,int)>(1, 2);
<org.apache.drill.exec.rpc.RpcEncoder: int HEADER_TAG> = v;
v = staticinvoke <org.apache.drill.exec.rpc.RpcEncoder: int makeTag(int,int)>(2, 2);
<org.apache.drill.exec.rpc.RpcEncoder: int PROTOBUF_BODY_TAG> = v;
v = staticinvoke <org.apache.drill.exec.rpc.RpcEncoder: int makeTag(int,int)>(3, 2);
<org.apache.drill.exec.rpc.RpcEncoder: int RAW_BODY_TAG> = v;
v = <org.apache.drill.exec.rpc.RpcEncoder: int HEADER_TAG>;
v = staticinvoke <org.apache.drill.exec.rpc.RpcEncoder: int getRawVarintSize(int)>(v);
<org.apache.drill.exec.rpc.RpcEncoder: int HEADER_TAG_LENGTH> = v;
v = <org.apache.drill.exec.rpc.RpcEncoder: int PROTOBUF_BODY_TAG>;
v = staticinvoke <org.apache.drill.exec.rpc.RpcEncoder: int getRawVarintSize(int)>(v);
<org.apache.drill.exec.rpc.RpcEncoder: int PROTOBUF_BODY_TAG_LENGTH> = v;
v = <org.apache.drill.exec.rpc.RpcEncoder: int RAW_BODY_TAG>;
v = staticinvoke <org.apache.drill.exec.rpc.RpcEncoder: int getRawVarintSize(int)>(v);
<org.apache.drill.exec.rpc.RpcEncoder: int RAW_BODY_TAG_LENGTH> = v;
return;
}
}