class org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler extends io.netty.channel.ChannelInboundHandlerAdapter
{
private final org.apache.drill.exec.rpc.OutboundRpcMessage PING_MESSAGE;
private final int answerWaitSec;
private final java.util.Queue pongFutures;
private io.netty.channel.ChannelHandlerContext ctx;
final org.apache.drill.exec.rpc.BasicClient this$0;
public void <init>(org.apache.drill.exec.rpc.BasicClient, int)
{
io.netty.buffer.ByteBuf[] v;
org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler v;
org.apache.drill.exec.proto.GeneralRPCProtos$RpcMode v;
org.apache.drill.exec.rpc.OutboundRpcMessage v;
org.apache.drill.exec.rpc.BasicClient v;
int v;
java.util.LinkedList v;
org.apache.drill.exec.proto.GeneralRPCProtos$Ack v;
v := @this: org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler;
v := @parameter: org.apache.drill.exec.rpc.BasicClient;
v := @parameter: int;
v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: org.apache.drill.exec.rpc.BasicClient this$0> = v;
specialinvoke v.<io.netty.channel.ChannelInboundHandlerAdapter: void <init>()>();
v = new org.apache.drill.exec.rpc.OutboundRpcMessage;
v = <org.apache.drill.exec.proto.GeneralRPCProtos$RpcMode: org.apache.drill.exec.proto.GeneralRPCProtos$RpcMode PING>;
v = <org.apache.drill.exec.rpc.Acks: org.apache.drill.exec.proto.GeneralRPCProtos$Ack OK>;
v = newarray (io.netty.buffer.ByteBuf)[0];
specialinvoke v.<org.apache.drill.exec.rpc.OutboundRpcMessage: void <init>(org.apache.drill.exec.proto.GeneralRPCProtos$RpcMode,int,int,com.google.protobuf.MessageLite,io.netty.buffer.ByteBuf[])>(v, 0, 0, v, v);
v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: org.apache.drill.exec.rpc.OutboundRpcMessage PING_MESSAGE> = v;
v = new java.util.LinkedList;
specialinvoke v.<java.util.LinkedList: void <init>()>();
v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: java.util.Queue pongFutures> = v;
v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: int answerWaitSec> = v;
return;
}
public void handlerAdded(io.netty.channel.ChannelHandlerContext) throws java.lang.Exception
{
io.netty.channel.ChannelHandlerContext v;
org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler v;
v := @this: org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: io.netty.channel.ChannelHandlerContext ctx> = v;
specialinvoke v.<io.netty.channel.ChannelInboundHandlerAdapter: void handlerAdded(io.netty.channel.ChannelHandlerContext)>(v);
return;
}
public void userEventTriggered(io.netty.channel.ChannelHandlerContext, java.lang.Object) throws java.lang.Exception
{
org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler v;
org.apache.drill.exec.proto.GeneralRPCProtos$RpcMode v;
io.netty.channel.ChannelHandlerContext v;
io.netty.handler.timeout.IdleState v, v;
java.lang.Object v;
boolean v, v;
v := @this: org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler;
v := @parameter: io.netty.channel.ChannelHandlerContext;
v := @parameter: java.lang.Object;
v = v instanceof io.netty.handler.timeout.IdleStateEvent;
if v == 0 goto label;
v = virtualinvoke v.<io.netty.handler.timeout.IdleStateEvent: io.netty.handler.timeout.IdleState state()>();
v = <io.netty.handler.timeout.IdleState: io.netty.handler.timeout.IdleState READER_IDLE>;
if v != v goto label;
specialinvoke v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: void idleEvent()>();
goto label;
label:
v = v instanceof org.apache.drill.exec.proto.GeneralRPCProtos$RpcMode;
if v == 0 goto label;
v = <org.apache.drill.exec.proto.GeneralRPCProtos$RpcMode: org.apache.drill.exec.proto.GeneralRPCProtos$RpcMode PONG>;
if v != v goto label;
specialinvoke v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: void pongReceived()>();
label:
interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.channel.ChannelHandlerContext fireUserEventTriggered(java.lang.Object)>(v);
return;
}
private void idleEvent()
{
io.netty.util.concurrent.EventExecutor v;
io.netty.util.concurrent.Promise v;
io.netty.util.concurrent.ScheduledFuture v;
java.lang.Runnable v;
org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler v;
java.util.concurrent.TimeUnit v;
io.netty.channel.ChannelHandlerContext v;
org.apache.commons.lang.tuple.Pair v;
int v, v;
java.util.Queue v;
v := @this: org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler;
v = v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: io.netty.channel.ChannelHandlerContext ctx>;
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.util.concurrent.EventExecutor executor()>();
v = interfaceinvoke v.<io.netty.util.concurrent.EventExecutor: io.netty.util.concurrent.Promise newPromise()>();
v = null;
v = v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: int answerWaitSec>;
if v <= 0 goto label;
v = staticinvoke <org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler$lambda_idleEvent_0__1: java.lang.Runnable bootstrap$(org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler,io.netty.util.concurrent.Promise)>(v, v);
v = v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: int answerWaitSec>;
v = <java.util.concurrent.TimeUnit: java.util.concurrent.TimeUnit SECONDS>;
v = interfaceinvoke v.<io.netty.util.concurrent.EventExecutor: io.netty.util.concurrent.ScheduledFuture schedule(java.lang.Runnable,long,java.util.concurrent.TimeUnit)>(v, v, v);
label:
v = v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: java.util.Queue pongFutures>;
v = staticinvoke <org.apache.commons.lang.tuple.Pair: org.apache.commons.lang.tuple.Pair of(java.lang.Object,java.lang.Object)>(v, v);
interfaceinvoke v.<java.util.Queue: boolean add(java.lang.Object)>(v);
specialinvoke v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: void sendPing()>();
return;
}
private void sendPing()
{
io.netty.channel.Channel v;
io.netty.channel.ChannelHandlerContext v;
org.apache.drill.exec.rpc.OutboundRpcMessage v;
io.netty.util.concurrent.GenericFutureListener v;
org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler v;
io.netty.channel.ChannelFuture v;
v := @this: org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler;
v = v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: io.netty.channel.ChannelHandlerContext ctx>;
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.channel.Channel channel()>();
v = v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: org.apache.drill.exec.rpc.OutboundRpcMessage PING_MESSAGE>;
v = interfaceinvoke v.<io.netty.channel.Channel: io.netty.channel.ChannelFuture writeAndFlush(java.lang.Object)>(v);
v = staticinvoke <org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler$lambda_sendPing_1__2: io.netty.util.concurrent.GenericFutureListener bootstrap$(org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler)>(v);
interfaceinvoke v.<io.netty.channel.ChannelFuture: io.netty.channel.ChannelFuture addListener(io.netty.util.concurrent.GenericFutureListener)>(v);
return;
}
private void pongReceived()
{
java.lang.Boolean v;
java.lang.Object v, v, v;
java.util.Queue v;
org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler v;
v := @this: org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler;
v = v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: java.util.Queue pongFutures>;
v = interfaceinvoke v.<java.util.Queue: java.lang.Object poll()>();
if v == null goto label;
v = virtualinvoke v.<org.apache.commons.lang.tuple.Pair: java.lang.Object getLeft()>();
v = staticinvoke <java.lang.Boolean: java.lang.Boolean valueOf(boolean)>(1);
interfaceinvoke v.<io.netty.util.concurrent.Promise: io.netty.util.concurrent.Promise setSuccess(java.lang.Object)>(v);
v = virtualinvoke v.<org.apache.commons.lang.tuple.Pair: java.lang.Object getRight()>();
if v == null goto label;
interfaceinvoke v.<io.netty.util.concurrent.ScheduledFuture: boolean cancel(boolean)>(0);
label:
return;
}
public io.netty.util.concurrent.Promise demandHeartbeat()
{
io.netty.util.concurrent.EventExecutor v;
io.netty.channel.ChannelHandlerContext v;
io.netty.util.concurrent.Promise v;
org.apache.commons.lang.tuple.Pair v;
java.util.Queue v;
org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler v;
v := @this: org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler;
v = v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: io.netty.channel.ChannelHandlerContext ctx>;
v = interfaceinvoke v.<io.netty.channel.ChannelHandlerContext: io.netty.util.concurrent.EventExecutor executor()>();
v = interfaceinvoke v.<io.netty.util.concurrent.EventExecutor: io.netty.util.concurrent.Promise newPromise()>();
v = v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: java.util.Queue pongFutures>;
v = staticinvoke <org.apache.commons.lang.tuple.Pair: org.apache.commons.lang.tuple.Pair of(java.lang.Object,java.lang.Object)>(v, null);
interfaceinvoke v.<java.util.Queue: boolean add(java.lang.Object)>(v);
specialinvoke v.<org.apache.drill.exec.rpc.BasicClient$HeartBeatHandler: void sendPing()>();
return v;
}
}