public final class io.netty.channel.nio.NioEventLoop extends io.netty.channel.SingleThreadEventLoop
{
private static final io.netty.util.internal.logging.InternalLogger logger;
private static final int CLEANUP_INTERVAL;
private static final boolean DISABLE_KEY_SET_OPTIMIZATION;
private static final int MIN_PREMATURE_SELECTOR_RETURNS;
private static final int SELECTOR_AUTO_REBUILD_THRESHOLD;
private final io.netty.util.IntSupplier selectNowSupplier;
private java.nio.channels.Selector selector;
private java.nio.channels.Selector unwrappedSelector;
private io.netty.channel.nio.SelectedSelectionKeySet selectedKeys;
private final java.nio.channels.spi.SelectorProvider provider;
private static final long AWAKE;
private static final long NONE;
private final java.util.concurrent.atomic.AtomicLong nextWakeupNanos;
private final io.netty.channel.SelectStrategy selectStrategy;
private volatile int ioRatio;
private int cancelledKeys;
private boolean needsToSelectAgain;
static final boolean $assertionsDisabled;
void <init>(io.netty.channel.nio.NioEventLoopGroup, java.util.concurrent.Executor, java.nio.channels.spi.SelectorProvider, io.netty.channel.SelectStrategy, io.netty.util.concurrent.RejectedExecutionHandler, io.netty.channel.EventLoopTaskQueueFactory, io.netty.channel.EventLoopTaskQueueFactory)
{
java.nio.channels.Selector v, v;
io.netty.channel.nio.NioEventLoop$SelectorTuple v;
java.nio.channels.spi.SelectorProvider v;
io.netty.channel.nio.NioEventLoop$1 v;
io.netty.util.concurrent.RejectedExecutionHandler v;
io.netty.channel.EventLoopTaskQueueFactory v, v;
java.util.concurrent.Executor v;
io.netty.channel.SelectStrategy v;
io.netty.channel.nio.NioEventLoopGroup v;
java.util.concurrent.atomic.AtomicLong v;
io.netty.channel.nio.NioEventLoop v;
java.lang.Object v, v;
java.util.Queue v, v;
v := @this: io.netty.channel.nio.NioEventLoop;
v := @parameter: io.netty.channel.nio.NioEventLoopGroup;
v := @parameter: java.util.concurrent.Executor;
v := @parameter: java.nio.channels.spi.SelectorProvider;
v := @parameter: io.netty.channel.SelectStrategy;
v := @parameter: io.netty.util.concurrent.RejectedExecutionHandler;
v := @parameter: io.netty.channel.EventLoopTaskQueueFactory;
v := @parameter: io.netty.channel.EventLoopTaskQueueFactory;
v = staticinvoke <io.netty.channel.nio.NioEventLoop: java.util.Queue newTaskQueue(io.netty.channel.EventLoopTaskQueueFactory)>(v);
v = staticinvoke <io.netty.channel.nio.NioEventLoop: java.util.Queue newTaskQueue(io.netty.channel.EventLoopTaskQueueFactory)>(v);
specialinvoke v.<io.netty.channel.SingleThreadEventLoop: void <init>(io.netty.channel.EventLoopGroup,java.util.concurrent.Executor,boolean,java.util.Queue,java.util.Queue,io.netty.util.concurrent.RejectedExecutionHandler)>(v, v, 0, v, v, v);
v = new io.netty.channel.nio.NioEventLoop$1;
specialinvoke v.<io.netty.channel.nio.NioEventLoop$1: void <init>(io.netty.channel.nio.NioEventLoop)>(v);
v.<io.netty.channel.nio.NioEventLoop: io.netty.util.IntSupplier selectNowSupplier> = v;
v = new java.util.concurrent.atomic.AtomicLong;
specialinvoke v.<java.util.concurrent.atomic.AtomicLong: void <init>(long)>(-1L);
v.<io.netty.channel.nio.NioEventLoop: java.util.concurrent.atomic.AtomicLong nextWakeupNanos> = v;
v.<io.netty.channel.nio.NioEventLoop: int ioRatio> = 50;
v = staticinvoke <io.netty.util.internal.ObjectUtil: java.lang.Object checkNotNull(java.lang.Object,java.lang.String)>(v, "selectorProvider");
v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.spi.SelectorProvider provider> = v;
v = staticinvoke <io.netty.util.internal.ObjectUtil: java.lang.Object checkNotNull(java.lang.Object,java.lang.String)>(v, "selectStrategy");
v.<io.netty.channel.nio.NioEventLoop: io.netty.channel.SelectStrategy selectStrategy> = v;
v = specialinvoke v.<io.netty.channel.nio.NioEventLoop: io.netty.channel.nio.NioEventLoop$SelectorTuple openSelector()>();
v = v.<io.netty.channel.nio.NioEventLoop$SelectorTuple: java.nio.channels.Selector selector>;
v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector> = v;
v = v.<io.netty.channel.nio.NioEventLoop$SelectorTuple: java.nio.channels.Selector unwrappedSelector>;
v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector unwrappedSelector> = v;
return;
}
private static java.util.Queue newTaskQueue(io.netty.channel.EventLoopTaskQueueFactory)
{
io.netty.channel.EventLoopTaskQueueFactory v;
int v, v;
java.util.Queue v, v;
v := @parameter: io.netty.channel.EventLoopTaskQueueFactory;
if v != null goto label;
v = <io.netty.channel.nio.NioEventLoop: int DEFAULT_MAX_PENDING_TASKS>;
v = staticinvoke <io.netty.channel.nio.NioEventLoop: java.util.Queue newTaskQueue0(int)>(v);
return v;
label:
v = <io.netty.channel.nio.NioEventLoop: int DEFAULT_MAX_PENDING_TASKS>;
v = interfaceinvoke v.<io.netty.channel.EventLoopTaskQueueFactory: java.util.Queue newTaskQueue(int)>(v);
return v;
}
private io.netty.channel.nio.NioEventLoop$SelectorTuple openSelector()
{
io.netty.channel.nio.SelectedSelectionKeySet v;
io.netty.channel.nio.NioEventLoop$SelectorTuple v, v, v, v;
java.nio.channels.spi.AbstractSelector v;
io.netty.channel.nio.SelectedSelectionKeySetSelector v;
java.nio.channels.spi.SelectorProvider v;
io.netty.channel.nio.NioEventLoop$3 v;
io.netty.channel.nio.NioEventLoop$4 v;
boolean v, v, v, v, v;
java.io.IOException v;
io.netty.channel.ChannelException v;
io.netty.util.internal.logging.InternalLogger v, v, v;
io.netty.channel.nio.NioEventLoop v;
java.lang.Class v;
java.lang.Object v, v;
v := @this: io.netty.channel.nio.NioEventLoop;
label:
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.spi.SelectorProvider provider>;
v = virtualinvoke v.<java.nio.channels.spi.SelectorProvider: java.nio.channels.spi.AbstractSelector openSelector()>();
label:
goto label;
label:
v := @caughtexception;
v = new io.netty.channel.ChannelException;
specialinvoke v.<io.netty.channel.ChannelException: void <init>(java.lang.String,java.lang.Throwable)>("failed to open a new selector", v);
throw v;
label:
v = <io.netty.channel.nio.NioEventLoop: boolean DISABLE_KEY_SET_OPTIMIZATION>;
if v == 0 goto label;
v = new io.netty.channel.nio.NioEventLoop$SelectorTuple;
specialinvoke v.<io.netty.channel.nio.NioEventLoop$SelectorTuple: void <init>(java.nio.channels.Selector)>(v);
return v;
label:
v = new io.netty.channel.nio.NioEventLoop$3;
specialinvoke v.<io.netty.channel.nio.NioEventLoop$3: void <init>(io.netty.channel.nio.NioEventLoop)>(v);
v = staticinvoke <java.security.AccessController: java.lang.Object doPrivileged(java.security.PrivilegedAction)>(v);
v = v instanceof java.lang.Class;
if v == 0 goto label;
v = virtualinvoke v.<java.lang.Object: java.lang.Class getClass()>();
v = virtualinvoke v.<java.lang.Class: boolean isAssignableFrom(java.lang.Class)>(v);
if v != 0 goto label;
label:
v = v instanceof java.lang.Throwable;
if v == 0 goto label;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void trace(java.lang.String,java.lang.Object,java.lang.Object)>("failed to instrument a special java.util.Set into: {}", v, v);
label:
v = new io.netty.channel.nio.NioEventLoop$SelectorTuple;
specialinvoke v.<io.netty.channel.nio.NioEventLoop$SelectorTuple: void <init>(java.nio.channels.Selector)>(v);
return v;
label:
v = new io.netty.channel.nio.SelectedSelectionKeySet;
specialinvoke v.<io.netty.channel.nio.SelectedSelectionKeySet: void <init>()>();
v = new io.netty.channel.nio.NioEventLoop$4;
specialinvoke v.<io.netty.channel.nio.NioEventLoop$4: void <init>(io.netty.channel.nio.NioEventLoop,java.lang.Class,java.nio.channels.Selector,io.netty.channel.nio.SelectedSelectionKeySet)>(v, v, v, v);
v = staticinvoke <java.security.AccessController: java.lang.Object doPrivileged(java.security.PrivilegedAction)>(v);
v = v instanceof java.lang.Exception;
if v == 0 goto label;
v.<io.netty.channel.nio.NioEventLoop: io.netty.channel.nio.SelectedSelectionKeySet selectedKeys> = null;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void trace(java.lang.String,java.lang.Object,java.lang.Object)>("failed to instrument a special java.util.Set into: {}", v, v);
v = new io.netty.channel.nio.NioEventLoop$SelectorTuple;
specialinvoke v.<io.netty.channel.nio.NioEventLoop$SelectorTuple: void <init>(java.nio.channels.Selector)>(v);
return v;
label:
v.<io.netty.channel.nio.NioEventLoop: io.netty.channel.nio.SelectedSelectionKeySet selectedKeys> = v;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void trace(java.lang.String,java.lang.Object)>("instrumented a special java.util.Set into: {}", v);
v = new io.netty.channel.nio.NioEventLoop$SelectorTuple;
v = new io.netty.channel.nio.SelectedSelectionKeySetSelector;
specialinvoke v.<io.netty.channel.nio.SelectedSelectionKeySetSelector: void <init>(java.nio.channels.Selector,io.netty.channel.nio.SelectedSelectionKeySet)>(v, v);
specialinvoke v.<io.netty.channel.nio.NioEventLoop$SelectorTuple: void <init>(java.nio.channels.Selector,java.nio.channels.Selector)>(v, v);
return v;
catch java.io.IOException from label to label with label;
}
public java.nio.channels.spi.SelectorProvider selectorProvider()
{
io.netty.channel.nio.NioEventLoop v;
java.nio.channels.spi.SelectorProvider v;
v := @this: io.netty.channel.nio.NioEventLoop;
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.spi.SelectorProvider provider>;
return v;
}
protected java.util.Queue newTaskQueue(int)
{
int v;
io.netty.channel.nio.NioEventLoop v;
java.util.Queue v;
v := @this: io.netty.channel.nio.NioEventLoop;
v := @parameter: int;
v = staticinvoke <io.netty.channel.nio.NioEventLoop: java.util.Queue newTaskQueue0(int)>(v);
return v;
}
private static java.util.Queue newTaskQueue0(int)
{
int v;
java.util.Queue v;
v := @parameter: int;
if v != 2147483647 goto label;
v = staticinvoke <io.netty.util.internal.PlatformDependent: java.util.Queue newMpscQueue()>();
goto label;
label:
v = staticinvoke <io.netty.util.internal.PlatformDependent: java.util.Queue newMpscQueue(int)>(v);
label:
return v;
}
public void register(java.nio.channels.SelectableChannel, int, io.netty.channel.nio.NioTask)
{
java.lang.IllegalStateException v;
io.netty.channel.nio.NioTask v;
java.lang.Thread v;
int v, v, v, v, v, v;
java.lang.String v;
io.netty.channel.nio.NioEventLoop$5 v;
boolean v, v;
java.lang.IllegalArgumentException v, v;
java.lang.InterruptedException v;
java.nio.channels.SelectableChannel v;
io.netty.channel.nio.NioEventLoop v;
io.netty.util.concurrent.Future v;
v := @this: io.netty.channel.nio.NioEventLoop;
v := @parameter: java.nio.channels.SelectableChannel;
v := @parameter: int;
v := @parameter: io.netty.channel.nio.NioTask;
staticinvoke <io.netty.util.internal.ObjectUtil: java.lang.Object checkNotNull(java.lang.Object,java.lang.String)>(v, "ch");
if v != 0 goto label;
v = new java.lang.IllegalArgumentException;
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>("interestOps must be non-zero.");
throw v;
label:
v = virtualinvoke v.<java.nio.channels.SelectableChannel: int validOps()>();
v = (int) -1;
v = v ^ v;
v = v & v;
if v == 0 goto label;
v = new java.lang.IllegalArgumentException;
v = virtualinvoke v.<java.nio.channels.SelectableChannel: int validOps()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int,int)>(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[])>("invalid interestOps: \u0001(validOps: \u)");
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>(v);
throw v;
label:
staticinvoke <io.netty.util.internal.ObjectUtil: java.lang.Object checkNotNull(java.lang.Object,java.lang.String)>(v, "task");
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean isShutdown()>();
if v == 0 goto label;
v = new java.lang.IllegalStateException;
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>("event loop shut down");
throw v;
label:
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean inEventLoop()>();
if v == 0 goto label;
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void register0(java.nio.channels.SelectableChannel,int,io.netty.channel.nio.NioTask)>(v, v, v);
goto label;
label:
v = new io.netty.channel.nio.NioEventLoop$5;
specialinvoke v.<io.netty.channel.nio.NioEventLoop$5: void <init>(io.netty.channel.nio.NioEventLoop,java.nio.channels.SelectableChannel,int,io.netty.channel.nio.NioTask)>(v, v, v, v);
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: io.netty.util.concurrent.Future submit(java.lang.Runnable)>(v);
interfaceinvoke v.<io.netty.util.concurrent.Future: io.netty.util.concurrent.Future sync()>();
label:
goto label;
label:
v := @caughtexception;
v = staticinvoke <java.lang.Thread: java.lang.Thread currentThread()>();
virtualinvoke v.<java.lang.Thread: void interrupt()>();
label:
return;
catch java.lang.InterruptedException from label to label with label;
}
private void register0(java.nio.channels.SelectableChannel, int, io.netty.channel.nio.NioTask)
{
io.netty.channel.EventLoopException v;
java.nio.channels.SelectableChannel v;
java.nio.channels.Selector v;
int v;
io.netty.channel.nio.NioEventLoop v;
io.netty.channel.nio.NioTask v;
java.lang.Exception v;
v := @this: io.netty.channel.nio.NioEventLoop;
v := @parameter: java.nio.channels.SelectableChannel;
v := @parameter: int;
v := @parameter: io.netty.channel.nio.NioTask;
label:
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector unwrappedSelector>;
virtualinvoke v.<java.nio.channels.SelectableChannel: java.nio.channels.SelectionKey register(java.nio.channels.Selector,int,java.lang.Object)>(v, v, v);
label:
goto label;
label:
v := @caughtexception;
v = new io.netty.channel.EventLoopException;
specialinvoke v.<io.netty.channel.EventLoopException: void <init>(java.lang.String,java.lang.Throwable)>("failed to register a channel", v);
throw v;
label:
return;
catch java.lang.Exception from label to label with label;
}
public int getIoRatio()
{
int v;
io.netty.channel.nio.NioEventLoop v;
v := @this: io.netty.channel.nio.NioEventLoop;
v = v.<io.netty.channel.nio.NioEventLoop: int ioRatio>;
return v;
}
public void setIoRatio(int)
{
int v;
io.netty.channel.nio.NioEventLoop v;
java.lang.String v;
java.lang.IllegalArgumentException v;
v := @this: io.netty.channel.nio.NioEventLoop;
v := @parameter: int;
if v <= 0 goto label;
if v <= 100 goto label;
label:
v = new java.lang.IllegalArgumentException;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int)>(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[])>("ioRatio: \u (expected: 0 < ioRatio <= 100)");
specialinvoke v.<java.lang.IllegalArgumentException: void <init>(java.lang.String)>(v);
throw v;
label:
v.<io.netty.channel.nio.NioEventLoop: int ioRatio> = v;
return;
}
public void rebuildSelector()
{
io.netty.channel.nio.NioEventLoop v;
io.netty.channel.nio.NioEventLoop$6 v;
boolean v;
v := @this: io.netty.channel.nio.NioEventLoop;
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean inEventLoop()>();
if v != 0 goto label;
v = new io.netty.channel.nio.NioEventLoop$6;
specialinvoke v.<io.netty.channel.nio.NioEventLoop$6: void <init>(io.netty.channel.nio.NioEventLoop)>(v);
virtualinvoke v.<io.netty.channel.nio.NioEventLoop: void execute(java.lang.Runnable)>(v);
return;
label:
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void rebuildSelector0()>();
return;
}
public int registeredChannels()
{
java.nio.channels.Selector v;
int v, v, v;
io.netty.channel.nio.NioEventLoop v;
java.util.Set v;
v := @this: io.netty.channel.nio.NioEventLoop;
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector>;
v = virtualinvoke v.<java.nio.channels.Selector: java.util.Set keys()>();
v = interfaceinvoke v.<java.util.Set: int size()>();
v = v.<io.netty.channel.nio.NioEventLoop: int cancelledKeys>;
v = v - v;
return v;
}
public java.util.Iterator registeredChannelsIterator()
{
java.util.Iterator v;
java.nio.channels.Selector v;
java.util.Set v;
java.lang.AssertionError v;
io.netty.channel.nio.NioEventLoop v;
io.netty.channel.nio.NioEventLoop$7 v;
boolean v, v, v;
v := @this: io.netty.channel.nio.NioEventLoop;
v = <io.netty.channel.nio.NioEventLoop: boolean $assertionsDisabled>;
if v != 0 goto label;
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean inEventLoop()>();
if v != 0 goto label;
v = new java.lang.AssertionError;
specialinvoke v.<java.lang.AssertionError: void <init>()>();
throw v;
label:
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector>;
v = virtualinvoke v.<java.nio.channels.Selector: java.util.Set keys()>();
v = interfaceinvoke v.<java.util.Set: boolean isEmpty()>();
if v == 0 goto label;
v = staticinvoke <io.netty.channel.SingleThreadEventLoop$ChannelsReadOnlyIterator: java.util.Iterator empty()>();
return v;
label:
v = new io.netty.channel.nio.NioEventLoop$7;
specialinvoke v.<io.netty.channel.nio.NioEventLoop$7: void <init>(io.netty.channel.nio.NioEventLoop,java.util.Set)>(v, v);
return v;
}
private void rebuildSelector0()
{
io.netty.channel.ChannelPromise v;
boolean v, v, v, v, v;
java.util.Set v;
java.lang.Exception v, v;
io.netty.util.internal.logging.InternalLogger v, v, v, v;
java.nio.channels.Selector v, v, v, v, v;
io.netty.channel.nio.NioEventLoop$SelectorTuple v;
int v, v;
java.lang.String v;
io.netty.channel.nio.AbstractNioChannel$NioUnsafe v, v;
java.util.Iterator v;
java.nio.channels.SelectionKey v, v;
java.nio.channels.SelectableChannel v, v;
io.netty.channel.nio.NioEventLoop v;
java.lang.Object v, v;
v := @this: io.netty.channel.nio.NioEventLoop;
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector>;
if v != null goto label;
return;
label:
v = specialinvoke v.<io.netty.channel.nio.NioEventLoop: io.netty.channel.nio.NioEventLoop$SelectorTuple openSelector()>();
label:
goto label;
label:
v := @caughtexception;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void warn(java.lang.String,java.lang.Throwable)>("Failed to create a new Selector.", v);
return;
label:
v = 0;
v = virtualinvoke v.<java.nio.channels.Selector: java.util.Set keys()>();
v = interfaceinvoke v.<java.util.Set: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = virtualinvoke v.<java.nio.channels.SelectionKey: java.lang.Object attachment()>();
label:
v = virtualinvoke v.<java.nio.channels.SelectionKey: boolean isValid()>();
if v == 0 goto label;
v = virtualinvoke v.<java.nio.channels.SelectionKey: java.nio.channels.SelectableChannel channel()>();
v = v.<io.netty.channel.nio.NioEventLoop$SelectorTuple: java.nio.channels.Selector unwrappedSelector>;
v = virtualinvoke v.<java.nio.channels.SelectableChannel: java.nio.channels.SelectionKey keyFor(java.nio.channels.Selector)>(v);
if v != null goto label;
label:
v = virtualinvoke v.<java.nio.channels.SelectionKey: int interestOps()>();
virtualinvoke v.<java.nio.channels.SelectionKey: void cancel()>();
v = virtualinvoke v.<java.nio.channels.SelectionKey: java.nio.channels.SelectableChannel channel()>();
v = v.<io.netty.channel.nio.NioEventLoop$SelectorTuple: java.nio.channels.Selector unwrappedSelector>;
v = virtualinvoke v.<java.nio.channels.SelectableChannel: java.nio.channels.SelectionKey register(java.nio.channels.Selector,int,java.lang.Object)>(v, v, v);
v = v instanceof io.netty.channel.nio.AbstractNioChannel;
if v == 0 goto label;
v.<io.netty.channel.nio.AbstractNioChannel: java.nio.channels.SelectionKey selectionKey> = v;
label:
v = v + 1;
label:
goto label;
label:
v := @caughtexception;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void warn(java.lang.String,java.lang.Throwable)>("Failed to re-register a Channel to the new Selector.", v);
v = v instanceof io.netty.channel.nio.AbstractNioChannel;
if v == 0 goto label;
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: io.netty.channel.nio.AbstractNioChannel$NioUnsafe unsafe()>();
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: io.netty.channel.nio.AbstractNioChannel$NioUnsafe unsafe()>();
v = interfaceinvoke v.<io.netty.channel.nio.AbstractNioChannel$NioUnsafe: io.netty.channel.ChannelPromise voidPromise()>();
interfaceinvoke v.<io.netty.channel.nio.AbstractNioChannel$NioUnsafe: void close(io.netty.channel.ChannelPromise)>(v);
goto label;
label:
staticinvoke <io.netty.channel.nio.NioEventLoop: void invokeChannelUnregistered(io.netty.channel.nio.NioTask,java.nio.channels.SelectionKey,java.lang.Throwable)>(v, v, v);
goto label;
label:
v = v.<io.netty.channel.nio.NioEventLoop$SelectorTuple: java.nio.channels.Selector selector>;
v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector> = v;
v = v.<io.netty.channel.nio.NioEventLoop$SelectorTuple: java.nio.channels.Selector unwrappedSelector>;
v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector unwrappedSelector> = v;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
v = interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: boolean isInfoEnabled()>();
if v == 0 goto label;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int)>(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[])>("Migrated \u channel(s) to the new Selector.");
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void info(java.lang.String)>(v);
label:
return;
catch java.lang.Exception from label to label with label;
catch java.lang.Exception from label to label with label;
catch java.lang.Exception from label to label with label;
}
protected void run()
{
java.lang.Integer v;
byte v;
io.netty.util.internal.logging.InternalLogger v, v, v, v;
java.lang.Throwable v, v, v, v, v, v, v, v, v, v, v;
java.nio.channels.CancelledKeyException v;
java.nio.channels.Selector v, v;
java.lang.Error v, v, v, v, v, v, v;
long v, v, v, v, v, v, v, v, v, v;
java.lang.String v, v;
io.netty.channel.SelectStrategy v;
java.io.IOException v;
java.util.concurrent.atomic.AtomicLong v, v, v;
io.netty.channel.nio.NioEventLoop v;
boolean v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
io.netty.util.IntSupplier v;
int v, v, v, v, v, v;
java.lang.Class v;
v := @this: io.netty.channel.nio.NioEventLoop;
v = 0;
label:
v = v.<io.netty.channel.nio.NioEventLoop: io.netty.channel.SelectStrategy selectStrategy>;
v = v.<io.netty.channel.nio.NioEventLoop: io.netty.util.IntSupplier selectNowSupplier>;
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean hasTasks()>();
v = interfaceinvoke v.<io.netty.channel.SelectStrategy: int calculateStrategy(io.netty.util.IntSupplier,boolean)>(v, v);
tableswitch(v)
{
case -3: goto label;
case -2: goto label;
case -1: goto label;
default: goto label;
};
label:
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean isShuttingDown()>();
if v == 0 goto label;
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void closeAll()>();
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean confirmShutdown()>();
if v == 0 goto label;
label:
return;
label:
v := @caughtexception;
throw v;
label:
v := @caughtexception;
staticinvoke <io.netty.channel.nio.NioEventLoop: void handleLoopException(java.lang.Throwable)>(v);
goto label;
label:
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: long nextScheduledTaskDeadlineNanos()>();
v = v cmp -1L;
if v != 0 goto label;
v = 9223372036854775807L;
label:
v = v.<io.netty.channel.nio.NioEventLoop: java.util.concurrent.atomic.AtomicLong nextWakeupNanos>;
virtualinvoke v.<java.util.concurrent.atomic.AtomicLong: void set(long)>(v);
label:
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean hasTasks()>();
if v != 0 goto label;
v = specialinvoke v.<io.netty.channel.nio.NioEventLoop: int select(long)>(v);
label:
v = v.<io.netty.channel.nio.NioEventLoop: java.util.concurrent.atomic.AtomicLong nextWakeupNanos>;
virtualinvoke v.<java.util.concurrent.atomic.AtomicLong: void lazySet(long)>(-1L);
goto label;
label:
v := @caughtexception;
v = v.<io.netty.channel.nio.NioEventLoop: java.util.concurrent.atomic.AtomicLong nextWakeupNanos>;
virtualinvoke v.<java.util.concurrent.atomic.AtomicLong: void lazySet(long)>(-1L);
throw v;
label:
v := @caughtexception;
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void rebuildSelector0()>();
v = 0;
staticinvoke <io.netty.channel.nio.NioEventLoop: void handleLoopException(java.lang.Throwable)>(v);
label:
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean isShuttingDown()>();
if v == 0 goto label;
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void closeAll()>();
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean confirmShutdown()>();
if v == 0 goto label;
label:
return;
label:
v := @caughtexception;
throw v;
label:
v := @caughtexception;
staticinvoke <io.netty.channel.nio.NioEventLoop: void handleLoopException(java.lang.Throwable)>(v);
goto label;
label:
v = v + 1;
v.<io.netty.channel.nio.NioEventLoop: int cancelledKeys> = 0;
v.<io.netty.channel.nio.NioEventLoop: boolean needsToSelectAgain> = 0;
v = v.<io.netty.channel.nio.NioEventLoop: int ioRatio>;
if v != 100 goto label;
label:
if v <= 0 goto label;
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void processSelectedKeys()>();
label:
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean runAllTasks()>();
goto label;
label:
v := @caughtexception;
virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean runAllTasks()>();
throw v;
label:
if v <= 0 goto label;
v = staticinvoke <java.lang.System: long nanoTime()>();
label:
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void processSelectedKeys()>();
label:
v = staticinvoke <java.lang.System: long nanoTime()>();
v = v - v;
v = 100 - v;
v = v * v;
v = v / v;
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean runAllTasks(long)>(v);
goto label;
label:
v := @caughtexception;
v = staticinvoke <java.lang.System: long nanoTime()>();
v = v - v;
v = 100 - v;
v = v * v;
v = v / v;
virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean runAllTasks(long)>(v);
throw v;
label:
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean runAllTasks(long)>(0L);
label:
if v != 0 goto label;
if v <= 0 goto label;
label:
if v <= 3 goto label;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
v = interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: boolean isDebugEnabled()>();
if v == 0 goto label;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
v = v - 1;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector>;
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void debug(java.lang.String,java.lang.Object,java.lang.Object)>("Selector.select() returned prematurely {} times in a row for Selector {}.", v, v);
label:
v = 0;
goto label;
label:
v = specialinvoke v.<io.netty.channel.nio.NioEventLoop: boolean unexpectedSelectorWakeup(int)>(v);
if v == 0 goto label;
v = 0;
label:
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean isShuttingDown()>();
if v == 0 goto label;
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void closeAll()>();
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean confirmShutdown()>();
if v == 0 goto label;
label:
return;
label:
v := @caughtexception;
throw v;
label:
v := @caughtexception;
staticinvoke <io.netty.channel.nio.NioEventLoop: void handleLoopException(java.lang.Throwable)>(v);
goto label;
label:
v := @caughtexception;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
v = interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: boolean isDebugEnabled()>();
if v == 0 goto label;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
v = class "Ljava/nio/channels/CancelledKeyException;";
v = virtualinvoke v.<java.lang.Class: java.lang.String getSimpleName()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(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[])>("\u raised by a Selector {} - JDK bug?");
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector>;
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void debug(java.lang.String,java.lang.Object,java.lang.Object)>(v, v, v);
label:
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean isShuttingDown()>();
if v == 0 goto label;
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void closeAll()>();
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean confirmShutdown()>();
if v == 0 goto label;
label:
return;
label:
v := @caughtexception;
throw v;
label:
v := @caughtexception;
staticinvoke <io.netty.channel.nio.NioEventLoop: void handleLoopException(java.lang.Throwable)>(v);
goto label;
label:
v := @caughtexception;
throw v;
label:
v := @caughtexception;
staticinvoke <io.netty.channel.nio.NioEventLoop: void handleLoopException(java.lang.Throwable)>(v);
label:
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean isShuttingDown()>();
if v == 0 goto label;
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void closeAll()>();
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean confirmShutdown()>();
if v == 0 goto label;
label:
return;
label:
v := @caughtexception;
throw v;
label:
v := @caughtexception;
staticinvoke <io.netty.channel.nio.NioEventLoop: void handleLoopException(java.lang.Throwable)>(v);
goto label;
label:
v := @caughtexception;
label:
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean isShuttingDown()>();
if v == 0 goto label;
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void closeAll()>();
v = virtualinvoke v.<io.netty.channel.nio.NioEventLoop: boolean confirmShutdown()>();
if v == 0 goto label;
label:
return;
label:
v := @caughtexception;
throw v;
label:
v := @caughtexception;
staticinvoke <io.netty.channel.nio.NioEventLoop: void handleLoopException(java.lang.Throwable)>(v);
label:
throw v;
catch java.lang.Error from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.io.IOException from label to label with label;
catch java.io.IOException from label to label with label;
catch java.lang.Error from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Error from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.nio.channels.CancelledKeyException from label to label with label;
catch java.nio.channels.CancelledKeyException from label to label with label;
catch java.nio.channels.CancelledKeyException from label to label with label;
catch java.lang.Error from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Error from label to label with label;
catch java.lang.Error from label to label with label;
catch java.lang.Error from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Error from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Error from label to label with label;
catch java.lang.Throwable from label to label with label;
}
private boolean unexpectedSelectorWakeup(int)
{
java.nio.channels.Selector v;
java.lang.Integer v;
io.netty.util.internal.logging.InternalLogger v, v, v;
int v, v, v;
io.netty.channel.nio.NioEventLoop v;
boolean v, v;
v := @this: io.netty.channel.nio.NioEventLoop;
v := @parameter: int;
v = staticinvoke <java.lang.Thread: boolean interrupted()>();
if v == 0 goto label;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
v = interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: boolean isDebugEnabled()>();
if v == 0 goto label;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void debug(java.lang.String)>("Selector.select() returned prematurely because Thread.currentThread().interrupt() was called. Use NioEventLoop.shutdownGracefully() to shutdown the NioEventLoop.");
label:
return 1;
label:
v = <io.netty.channel.nio.NioEventLoop: int SELECTOR_AUTO_REBUILD_THRESHOLD>;
if v <= 0 goto label;
v = <io.netty.channel.nio.NioEventLoop: int SELECTOR_AUTO_REBUILD_THRESHOLD>;
if v < v goto label;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector>;
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void warn(java.lang.String,java.lang.Object,java.lang.Object)>("Selector.select() returned prematurely {} times in a row; rebuilding Selector {}.", v, v);
virtualinvoke v.<io.netty.channel.nio.NioEventLoop: void rebuildSelector()>();
return 1;
label:
return 0;
}
private static void handleLoopException(java.lang.Throwable)
{
java.lang.Throwable v;
java.lang.InterruptedException v;
io.netty.util.internal.logging.InternalLogger v;
v := @parameter: java.lang.Throwable;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void warn(java.lang.String,java.lang.Throwable)>("Unexpected exception in the selector loop.", v);
label:
staticinvoke <java.lang.Thread: void sleep(long)>(1000L);
label:
goto label;
label:
v := @caughtexception;
label:
return;
catch java.lang.InterruptedException from label to label with label;
}
private void processSelectedKeys()
{
io.netty.channel.nio.SelectedSelectionKeySet v;
java.nio.channels.Selector v;
io.netty.channel.nio.NioEventLoop v;
java.util.Set v;
v := @this: io.netty.channel.nio.NioEventLoop;
v = v.<io.netty.channel.nio.NioEventLoop: io.netty.channel.nio.SelectedSelectionKeySet selectedKeys>;
if v == null goto label;
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void processSelectedKeysOptimized()>();
goto label;
label:
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector>;
v = virtualinvoke v.<java.nio.channels.Selector: java.util.Set selectedKeys()>();
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void processSelectedKeysPlain(java.util.Set)>(v);
label:
return;
}
protected void cleanup()
{
io.netty.util.internal.logging.InternalLogger v;
java.nio.channels.Selector v;
io.netty.channel.nio.NioEventLoop v;
java.io.IOException v;
v := @this: io.netty.channel.nio.NioEventLoop;
label:
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector>;
virtualinvoke v.<java.nio.channels.Selector: void close()>();
label:
goto label;
label:
v := @caughtexception;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void warn(java.lang.String,java.lang.Throwable)>("Failed to close a selector.", v);
label:
return;
catch java.io.IOException from label to label with label;
}
void cancel(java.nio.channels.SelectionKey)
{
java.nio.channels.SelectionKey v;
int v, v, v;
io.netty.channel.nio.NioEventLoop v;
v := @this: io.netty.channel.nio.NioEventLoop;
v := @parameter: java.nio.channels.SelectionKey;
virtualinvoke v.<java.nio.channels.SelectionKey: void cancel()>();
v = v.<io.netty.channel.nio.NioEventLoop: int cancelledKeys>;
v = v + 1;
v.<io.netty.channel.nio.NioEventLoop: int cancelledKeys> = v;
v = v.<io.netty.channel.nio.NioEventLoop: int cancelledKeys>;
if v < 256 goto label;
v.<io.netty.channel.nio.NioEventLoop: int cancelledKeys> = 0;
v.<io.netty.channel.nio.NioEventLoop: boolean needsToSelectAgain> = 1;
label:
return;
}
private void processSelectedKeysPlain(java.util.Set)
{
java.util.Iterator v;
java.nio.channels.Selector v;
java.util.Set v, v;
io.netty.channel.nio.NioEventLoop v;
java.lang.Object v, v;
boolean v, v, v, v, v;
v := @this: io.netty.channel.nio.NioEventLoop;
v := @parameter: java.util.Set;
v = interfaceinvoke v.<java.util.Set: boolean isEmpty()>();
if v == 0 goto label;
return;
label:
v = interfaceinvoke v.<java.util.Set: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = virtualinvoke v.<java.nio.channels.SelectionKey: java.lang.Object attachment()>();
interfaceinvoke v.<java.util.Iterator: void remove()>();
v = v instanceof io.netty.channel.nio.AbstractNioChannel;
if v == 0 goto label;
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void processSelectedKey(java.nio.channels.SelectionKey,io.netty.channel.nio.AbstractNioChannel)>(v, v);
goto label;
label:
staticinvoke <io.netty.channel.nio.NioEventLoop: void processSelectedKey(java.nio.channels.SelectionKey,io.netty.channel.nio.NioTask)>(v, v);
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = v.<io.netty.channel.nio.NioEventLoop: boolean needsToSelectAgain>;
if v == 0 goto label;
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void selectAgain()>();
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector>;
v = virtualinvoke v.<java.nio.channels.Selector: java.util.Set selectedKeys()>();
v = interfaceinvoke v.<java.util.Set: boolean isEmpty()>();
if v != 0 goto label;
v = interfaceinvoke v.<java.util.Set: java.util.Iterator iterator()>();
goto label;
label:
return;
}
private void processSelectedKeysOptimized()
{
io.netty.channel.nio.SelectedSelectionKeySet v, v, v, v;
java.nio.channels.SelectionKey v;
java.nio.channels.SelectionKey[] v, v;
int v, v, v, v;
io.netty.channel.nio.NioEventLoop v;
java.lang.Object v;
boolean v, v;
v := @this: io.netty.channel.nio.NioEventLoop;
v = 0;
label:
v = v.<io.netty.channel.nio.NioEventLoop: io.netty.channel.nio.SelectedSelectionKeySet selectedKeys>;
v = v.<io.netty.channel.nio.SelectedSelectionKeySet: int size>;
if v >= v goto label;
v = v.<io.netty.channel.nio.NioEventLoop: io.netty.channel.nio.SelectedSelectionKeySet selectedKeys>;
v = v.<io.netty.channel.nio.SelectedSelectionKeySet: java.nio.channels.SelectionKey[] keys>;
v = v[v];
v = v.<io.netty.channel.nio.NioEventLoop: io.netty.channel.nio.SelectedSelectionKeySet selectedKeys>;
v = v.<io.netty.channel.nio.SelectedSelectionKeySet: java.nio.channels.SelectionKey[] keys>;
v[v] = null;
v = virtualinvoke v.<java.nio.channels.SelectionKey: java.lang.Object attachment()>();
v = v instanceof io.netty.channel.nio.AbstractNioChannel;
if v == 0 goto label;
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void processSelectedKey(java.nio.channels.SelectionKey,io.netty.channel.nio.AbstractNioChannel)>(v, v);
goto label;
label:
staticinvoke <io.netty.channel.nio.NioEventLoop: void processSelectedKey(java.nio.channels.SelectionKey,io.netty.channel.nio.NioTask)>(v, v);
label:
v = v.<io.netty.channel.nio.NioEventLoop: boolean needsToSelectAgain>;
if v == 0 goto label;
v = v.<io.netty.channel.nio.NioEventLoop: io.netty.channel.nio.SelectedSelectionKeySet selectedKeys>;
v = v + 1;
virtualinvoke v.<io.netty.channel.nio.SelectedSelectionKeySet: void reset(int)>(v);
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void selectAgain()>();
v = (int) -1;
v = v;
label:
v = v + 1;
goto label;
label:
return;
}
private void processSelectedKey(java.nio.channels.SelectionKey, io.netty.channel.nio.AbstractNioChannel)
{
java.lang.Throwable v;
java.nio.channels.CancelledKeyException v;
io.netty.channel.ChannelPromise v, v;
int v, v, v, v, v, v, v;
io.netty.channel.nio.AbstractNioChannel v;
boolean v;
io.netty.channel.nio.AbstractNioChannel$NioUnsafe v;
java.nio.channels.SelectionKey v;
io.netty.channel.nio.NioEventLoop v, v;
v := @this: io.netty.channel.nio.NioEventLoop;
v := @parameter: java.nio.channels.SelectionKey;
v := @parameter: io.netty.channel.nio.AbstractNioChannel;
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: io.netty.channel.nio.AbstractNioChannel$NioUnsafe unsafe()>();
v = virtualinvoke v.<java.nio.channels.SelectionKey: boolean isValid()>();
if v != 0 goto label;
label:
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: io.netty.channel.nio.NioEventLoop eventLoop()>();
label:
goto label;
label:
v := @caughtexception;
return;
label:
if v != v goto label;
v = interfaceinvoke v.<io.netty.channel.nio.AbstractNioChannel$NioUnsafe: io.netty.channel.ChannelPromise voidPromise()>();
interfaceinvoke v.<io.netty.channel.nio.AbstractNioChannel$NioUnsafe: void close(io.netty.channel.ChannelPromise)>(v);
label:
return;
label:
v = virtualinvoke v.<java.nio.channels.SelectionKey: int readyOps()>();
v = v & 8;
if v == 0 goto label;
v = virtualinvoke v.<java.nio.channels.SelectionKey: int interestOps()>();
v = (int) -9;
v = v & v;
virtualinvoke v.<java.nio.channels.SelectionKey: java.nio.channels.SelectionKey interestOps(int)>(v);
interfaceinvoke v.<io.netty.channel.nio.AbstractNioChannel$NioUnsafe: void finishConnect()>();
label:
v = v & 4;
if v == 0 goto label;
interfaceinvoke v.<io.netty.channel.nio.AbstractNioChannel$NioUnsafe: void forceFlush()>();
label:
v = v & 17;
if v != 0 goto label;
if v != 0 goto label;
label:
interfaceinvoke v.<io.netty.channel.nio.AbstractNioChannel$NioUnsafe: void read()>();
label:
goto label;
label:
v := @caughtexception;
v = interfaceinvoke v.<io.netty.channel.nio.AbstractNioChannel$NioUnsafe: io.netty.channel.ChannelPromise voidPromise()>();
interfaceinvoke v.<io.netty.channel.nio.AbstractNioChannel$NioUnsafe: void close(io.netty.channel.ChannelPromise)>(v);
label:
return;
catch java.lang.Throwable from label to label with label;
catch java.nio.channels.CancelledKeyException from label to label with label;
}
private static void processSelectedKey(java.nio.channels.SelectionKey, io.netty.channel.nio.NioTask)
{
java.lang.Throwable v;
java.nio.channels.SelectionKey v;
io.netty.channel.nio.NioTask v;
java.lang.Exception v;
java.nio.channels.SelectableChannel v;
boolean v, v, v;
v := @parameter: java.nio.channels.SelectionKey;
v := @parameter: io.netty.channel.nio.NioTask;
label:
v = virtualinvoke v.<java.nio.channels.SelectionKey: java.nio.channels.SelectableChannel channel()>();
interfaceinvoke v.<io.netty.channel.nio.NioTask: void channelReady(java.nio.channels.SelectableChannel,java.nio.channels.SelectionKey)>(v, v);
label:
lookupswitch(1)
{
case 0: goto label;
case 1: goto label;
default: goto label;
};
label:
virtualinvoke v.<java.nio.channels.SelectionKey: void cancel()>();
staticinvoke <io.netty.channel.nio.NioEventLoop: void invokeChannelUnregistered(io.netty.channel.nio.NioTask,java.nio.channels.SelectionKey,java.lang.Throwable)>(v, v, null);
goto label;
label:
v = virtualinvoke v.<java.nio.channels.SelectionKey: boolean isValid()>();
if v != 0 goto label;
staticinvoke <io.netty.channel.nio.NioEventLoop: void invokeChannelUnregistered(io.netty.channel.nio.NioTask,java.nio.channels.SelectionKey,java.lang.Throwable)>(v, v, null);
goto label;
label:
v := @caughtexception;
virtualinvoke v.<java.nio.channels.SelectionKey: void cancel()>();
staticinvoke <io.netty.channel.nio.NioEventLoop: void invokeChannelUnregistered(io.netty.channel.nio.NioTask,java.nio.channels.SelectionKey,java.lang.Throwable)>(v, v, v);
label:
lookupswitch(2)
{
case 0: goto label;
case 1: goto label;
default: goto label;
};
label:
virtualinvoke v.<java.nio.channels.SelectionKey: void cancel()>();
staticinvoke <io.netty.channel.nio.NioEventLoop: void invokeChannelUnregistered(io.netty.channel.nio.NioTask,java.nio.channels.SelectionKey,java.lang.Throwable)>(v, v, null);
goto label;
label:
v = virtualinvoke v.<java.nio.channels.SelectionKey: boolean isValid()>();
if v != 0 goto label;
staticinvoke <io.netty.channel.nio.NioEventLoop: void invokeChannelUnregistered(io.netty.channel.nio.NioTask,java.nio.channels.SelectionKey,java.lang.Throwable)>(v, v, null);
goto label;
label:
v := @caughtexception;
lookupswitch(0)
{
case 0: goto label;
case 1: goto label;
default: goto label;
};
label:
virtualinvoke v.<java.nio.channels.SelectionKey: void cancel()>();
staticinvoke <io.netty.channel.nio.NioEventLoop: void invokeChannelUnregistered(io.netty.channel.nio.NioTask,java.nio.channels.SelectionKey,java.lang.Throwable)>(v, v, null);
goto label;
label:
v = virtualinvoke v.<java.nio.channels.SelectionKey: boolean isValid()>();
if v != 0 goto label;
staticinvoke <io.netty.channel.nio.NioEventLoop: void invokeChannelUnregistered(io.netty.channel.nio.NioTask,java.nio.channels.SelectionKey,java.lang.Throwable)>(v, v, null);
label:
throw v;
label:
return;
catch java.lang.Exception from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
}
private void closeAll()
{
java.nio.channels.Selector v;
java.util.ArrayList v;
io.netty.channel.ChannelPromise v;
int v;
boolean v, v, v;
io.netty.channel.nio.AbstractNioChannel$NioUnsafe v, v;
java.util.Iterator v, v;
java.util.Set v;
io.netty.channel.nio.NioEventLoop v;
java.lang.Object v, v, v;
v := @this: io.netty.channel.nio.NioEventLoop;
specialinvoke v.<io.netty.channel.nio.NioEventLoop: void selectAgain()>();
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector>;
v = virtualinvoke v.<java.nio.channels.Selector: java.util.Set keys()>();
v = new java.util.ArrayList;
v = interfaceinvoke v.<java.util.Set: int size()>();
specialinvoke v.<java.util.ArrayList: void <init>(int)>(v);
v = interfaceinvoke v.<java.util.Set: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = virtualinvoke v.<java.nio.channels.SelectionKey: java.lang.Object attachment()>();
v = v instanceof io.netty.channel.nio.AbstractNioChannel;
if v == 0 goto label;
interfaceinvoke v.<java.util.Collection: boolean add(java.lang.Object)>(v);
goto label;
label:
virtualinvoke v.<java.nio.channels.SelectionKey: void cancel()>();
staticinvoke <io.netty.channel.nio.NioEventLoop: void invokeChannelUnregistered(io.netty.channel.nio.NioTask,java.nio.channels.SelectionKey,java.lang.Throwable)>(v, v, null);
goto label;
label:
v = interfaceinvoke v.<java.util.Collection: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: io.netty.channel.nio.AbstractNioChannel$NioUnsafe unsafe()>();
v = virtualinvoke v.<io.netty.channel.nio.AbstractNioChannel: io.netty.channel.nio.AbstractNioChannel$NioUnsafe unsafe()>();
v = interfaceinvoke v.<io.netty.channel.nio.AbstractNioChannel$NioUnsafe: io.netty.channel.ChannelPromise voidPromise()>();
interfaceinvoke v.<io.netty.channel.nio.AbstractNioChannel$NioUnsafe: void close(io.netty.channel.ChannelPromise)>(v);
goto label;
label:
return;
}
private static void invokeChannelUnregistered(io.netty.channel.nio.NioTask, java.nio.channels.SelectionKey, java.lang.Throwable)
{
java.lang.Throwable v;
java.nio.channels.SelectableChannel v;
java.nio.channels.SelectionKey v;
io.netty.util.internal.logging.InternalLogger v;
io.netty.channel.nio.NioTask v;
java.lang.Exception v;
v := @parameter: io.netty.channel.nio.NioTask;
v := @parameter: java.nio.channels.SelectionKey;
v := @parameter: java.lang.Throwable;
label:
v = virtualinvoke v.<java.nio.channels.SelectionKey: java.nio.channels.SelectableChannel channel()>();
interfaceinvoke v.<io.netty.channel.nio.NioTask: void channelUnregistered(java.nio.channels.SelectableChannel,java.lang.Throwable)>(v, v);
label:
goto label;
label:
v := @caughtexception;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void warn(java.lang.String,java.lang.Throwable)>("Unexpected exception while running NioTask.channelUnregistered()", v);
label:
return;
catch java.lang.Exception from label to label with label;
}
protected void wakeup(boolean)
{
java.util.concurrent.atomic.AtomicLong v;
byte v;
java.nio.channels.Selector v;
io.netty.channel.nio.NioEventLoop v;
long v;
boolean v;
v := @this: io.netty.channel.nio.NioEventLoop;
v := @parameter: boolean;
if v != 0 goto label;
v = v.<io.netty.channel.nio.NioEventLoop: java.util.concurrent.atomic.AtomicLong nextWakeupNanos>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicLong: long getAndSet(long)>(-1L);
v = v cmp -1L;
if v == 0 goto label;
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector>;
virtualinvoke v.<java.nio.channels.Selector: java.nio.channels.Selector wakeup()>();
label:
return;
}
protected boolean beforeScheduledTaskSubmitted(long)
{
java.util.concurrent.atomic.AtomicLong v;
byte v;
io.netty.channel.nio.NioEventLoop v;
long v, v;
boolean v;
v := @this: io.netty.channel.nio.NioEventLoop;
v := @parameter: long;
v = v.<io.netty.channel.nio.NioEventLoop: java.util.concurrent.atomic.AtomicLong nextWakeupNanos>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicLong: long get()>();
v = v cmp v;
if v >= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
protected boolean afterScheduledTaskSubmitted(long)
{
java.util.concurrent.atomic.AtomicLong v;
byte v;
io.netty.channel.nio.NioEventLoop v;
long v, v;
boolean v;
v := @this: io.netty.channel.nio.NioEventLoop;
v := @parameter: long;
v = v.<io.netty.channel.nio.NioEventLoop: java.util.concurrent.atomic.AtomicLong nextWakeupNanos>;
v = virtualinvoke v.<java.util.concurrent.atomic.AtomicLong: long get()>();
v = v cmp v;
if v >= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
java.nio.channels.Selector unwrappedSelector()
{
io.netty.channel.nio.NioEventLoop v;
java.nio.channels.Selector v;
v := @this: io.netty.channel.nio.NioEventLoop;
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector unwrappedSelector>;
return v;
}
int selectNow() throws java.io.IOException
{
int v;
io.netty.channel.nio.NioEventLoop v;
java.nio.channels.Selector v;
v := @this: io.netty.channel.nio.NioEventLoop;
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector>;
v = virtualinvoke v.<java.nio.channels.Selector: int selectNow()>();
return v;
}
private int select(long) throws java.io.IOException
{
java.nio.channels.Selector v, v, v;
long v, v, v, v;
byte v, v;
int v, v;
io.netty.channel.nio.NioEventLoop v;
v := @this: io.netty.channel.nio.NioEventLoop;
v := @parameter: long;
v = v cmp 9223372036854775807L;
if v != 0 goto label;
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector>;
v = virtualinvoke v.<java.nio.channels.Selector: int select()>();
return v;
label:
v = v + 995000L;
v = staticinvoke <io.netty.channel.nio.NioEventLoop: long deadlineToDelayNanos(long)>(v);
v = v / 1000000L;
v = v cmp 0L;
if v > 0 goto label;
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector>;
v = virtualinvoke v.<java.nio.channels.Selector: int selectNow()>();
goto label;
label:
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector>;
v = virtualinvoke v.<java.nio.channels.Selector: int select(long)>(v);
label:
return v;
}
private void selectAgain()
{
java.lang.Throwable v;
io.netty.util.internal.logging.InternalLogger v;
java.nio.channels.Selector v;
io.netty.channel.nio.NioEventLoop v;
v := @this: io.netty.channel.nio.NioEventLoop;
v.<io.netty.channel.nio.NioEventLoop: boolean needsToSelectAgain> = 0;
label:
v = v.<io.netty.channel.nio.NioEventLoop: java.nio.channels.Selector selector>;
virtualinvoke v.<java.nio.channels.Selector: int selectNow()>();
label:
goto label;
label:
v := @caughtexception;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void warn(java.lang.String,java.lang.Throwable)>("Failed to update SelectionKeys.", v);
label:
return;
catch java.lang.Throwable from label to label with label;
}
static void <clinit>()
{
java.lang.Integer v;
int v, v, v;
io.netty.channel.nio.NioEventLoop$2 v;
java.lang.Boolean v;
java.lang.SecurityException v;
java.lang.String v;
boolean v, v, v, v, v;
io.netty.util.internal.logging.InternalLogger v, v, v, v, v;
java.lang.Class v;
v = class "Lio/netty/channel/nio/NioEventLoop;";
v = virtualinvoke v.<java.lang.Class: boolean desiredAssertionStatus()>();
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
<io.netty.channel.nio.NioEventLoop: boolean $assertionsDisabled> = v;
v = staticinvoke <io.netty.util.internal.logging.InternalLoggerFactory: io.netty.util.internal.logging.InternalLogger getInstance(java.lang.Class)>(class "Lio/netty/channel/nio/NioEventLoop;");
<io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger> = v;
v = staticinvoke <io.netty.util.internal.SystemPropertyUtil: boolean getBoolean(java.lang.String,boolean)>("io.netty.noKeySetOptimization", 0);
<io.netty.channel.nio.NioEventLoop: boolean DISABLE_KEY_SET_OPTIMIZATION> = v;
v = staticinvoke <io.netty.util.internal.PlatformDependent: int javaVersion()>();
if v >= 7 goto label;
v = staticinvoke <io.netty.util.internal.SystemPropertyUtil: java.lang.String get(java.lang.String)>("sun.nio.ch.bugLevel");
if v != null goto label;
label:
v = new io.netty.channel.nio.NioEventLoop$2;
specialinvoke v.<io.netty.channel.nio.NioEventLoop$2: void <init>()>();
staticinvoke <java.security.AccessController: java.lang.Object doPrivileged(java.security.PrivilegedAction)>(v);
label:
goto label;
label:
v := @caughtexception;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void debug(java.lang.String,java.lang.Throwable)>("Unable to get/set System Property: sun.nio.ch.bugLevel", v);
label:
v = staticinvoke <io.netty.util.internal.SystemPropertyUtil: int getInt(java.lang.String,int)>("io.netty.selectorAutoRebuildThreshold", 512);
if v >= 3 goto label;
v = 0;
label:
<io.netty.channel.nio.NioEventLoop: int SELECTOR_AUTO_REBUILD_THRESHOLD> = v;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
v = interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: boolean isDebugEnabled()>();
if v == 0 goto label;
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
v = <io.netty.channel.nio.NioEventLoop: boolean DISABLE_KEY_SET_OPTIMIZATION>;
v = staticinvoke <java.lang.Boolean: java.lang.Boolean valueOf(boolean)>(v);
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void debug(java.lang.String,java.lang.Object)>("-Dio.netty.noKeySetOptimization: {}", v);
v = <io.netty.channel.nio.NioEventLoop: io.netty.util.internal.logging.InternalLogger logger>;
v = <io.netty.channel.nio.NioEventLoop: int SELECTOR_AUTO_REBUILD_THRESHOLD>;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
interfaceinvoke v.<io.netty.util.internal.logging.InternalLogger: void debug(java.lang.String,java.lang.Object)>("-Dio.netty.selectorAutoRebuildThreshold: {}", v);
label:
return;
catch java.lang.SecurityException from label to label with label;
}
}