public final class org.glassfish.grizzly.nio.SelectorRunner implements java.lang.Runnable
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.glassfish.grizzly.nio.SelectorRunner
super_class: java.lang.Object
{
private static final java.util.logging.Logger LOGGER;
descriptor: Ljava/util/logging/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static final java.lang.String THREAD_MARKER;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: " SelectorRunner"
private final org.glassfish.grizzly.nio.NIOTransport transport;
descriptor: Lorg/glassfish/grizzly/nio/NIOTransport;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.atomic.AtomicReference<org.glassfish.grizzly.Transport$State> stateHolder;
descriptor: Ljava/util/concurrent/atomic/AtomicReference;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/atomic/AtomicReference<Lorg/glassfish/grizzly/Transport$State;>;
private final java.util.Queue<org.glassfish.grizzly.nio.SelectorHandlerTask> pendingTasks;
descriptor: Ljava/util/Queue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Queue<Lorg/glassfish/grizzly/nio/SelectorHandlerTask;>;
private java.util.Queue<org.glassfish.grizzly.nio.SelectorHandlerTask> currentPostponedTasks;
descriptor: Ljava/util/Queue;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/Queue<Lorg/glassfish/grizzly/nio/SelectorHandlerTask;>;
private final java.util.Queue<org.glassfish.grizzly.nio.SelectorHandlerTask> evenPostponedTasks;
descriptor: Ljava/util/Queue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Queue<Lorg/glassfish/grizzly/nio/SelectorHandlerTask;>;
private final java.util.Queue<org.glassfish.grizzly.nio.SelectorHandlerTask> oddPostponedTasks;
descriptor: Ljava/util/Queue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Queue<Lorg/glassfish/grizzly/nio/SelectorHandlerTask;>;
private volatile int dumbVolatile;
descriptor: I
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private java.nio.channels.Selector selector;
descriptor: Ljava/nio/channels/Selector;
flags: (0x0002) ACC_PRIVATE
private java.lang.Thread selectorRunnerThread;
descriptor: Ljava/lang/Thread;
flags: (0x0002) ACC_PRIVATE
private boolean isResume;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private int lastSelectedKeysCount;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private java.util.Set<java.nio.channels.SelectionKey> readyKeySet;
descriptor: Ljava/util/Set;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/Set<Ljava/nio/channels/SelectionKey;>;
private java.util.Iterator<java.nio.channels.SelectionKey> iterator;
descriptor: Ljava/util/Iterator;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/Iterator<Ljava/nio/channels/SelectionKey;>;
private java.nio.channels.SelectionKey key;
descriptor: Ljava/nio/channels/SelectionKey;
flags: (0x0002) ACC_PRIVATE
private int keyReadyOps;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private final java.util.concurrent.atomic.AtomicBoolean selectorWakeupFlag;
descriptor: Ljava/util/concurrent/atomic/AtomicBoolean;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.atomic.AtomicInteger runnerThreadActivityCounter;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
volatile boolean hasPendingTasks;
descriptor: Z
flags: (0x0040) ACC_VOLATILE
private long lastSpinTimestamp;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private int emptySpinCounter;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private final java.util.Map<java.nio.channels.Selector, java.lang.Long> spinnedSelectorsHistory;
descriptor: Ljava/util/Map;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Map<Ljava/nio/channels/Selector;Ljava/lang/Long;>;
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/glassfish/grizzly/nio/SelectorRunner;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic org.glassfish.grizzly.nio.SelectorRunner.$assertionsDisabled:Z
3: ldc Lorg/glassfish/grizzly/nio/SelectorRunner;
invokestatic org.glassfish.grizzly.Grizzly.logger:(Ljava/lang/Class;)Ljava/util/logging/Logger;
putstatic org.glassfish.grizzly.nio.SelectorRunner.LOGGER:Ljava/util/logging/Logger;
4: return
LocalVariableTable:
Start End Slot Name Signature
public static org.glassfish.grizzly.nio.SelectorRunner create(org.glassfish.grizzly.nio.NIOTransport);
descriptor: (Lorg/glassfish/grizzly/nio/NIOTransport;)Lorg/glassfish/grizzly/nio/SelectorRunner;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: new org.glassfish.grizzly.nio.SelectorRunner
dup
aload 0
aload 0
invokevirtual org.glassfish.grizzly.nio.NIOTransport.getSelectorProvider:()Ljava/nio/channels/spi/SelectorProvider;
invokestatic org.glassfish.grizzly.nio.Selectors.newSelector:(Ljava/nio/channels/spi/SelectorProvider;)Ljava/nio/channels/Selector;
invokespecial org.glassfish.grizzly.nio.SelectorRunner.<init>:(Lorg/glassfish/grizzly/nio/NIOTransport;Ljava/nio/channels/Selector;)V
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 transport Lorg/glassfish/grizzly/nio/NIOTransport;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
transport final
private void <init>(org.glassfish.grizzly.nio.NIOTransport, java.nio.channels.Selector);
descriptor: (Lorg/glassfish/grizzly/nio/NIOTransport;Ljava/nio/channels/Selector;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
iconst_1
putfield org.glassfish.grizzly.nio.SelectorRunner.dumbVolatile:I
2: aload 0
aconst_null
putfield org.glassfish.grizzly.nio.SelectorRunner.key:Ljava/nio/channels/SelectionKey;
3: aload 0
new java.util.concurrent.atomic.AtomicBoolean
dup
invokespecial java.util.concurrent.atomic.AtomicBoolean.<init>:()V
putfield org.glassfish.grizzly.nio.SelectorRunner.selectorWakeupFlag:Ljava/util/concurrent/atomic/AtomicBoolean;
4: aload 0
new java.util.concurrent.atomic.AtomicInteger
dup
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:()V
putfield org.glassfish.grizzly.nio.SelectorRunner.runnerThreadActivityCounter:Ljava/util/concurrent/atomic/AtomicInteger;
5: aload 0
new java.util.WeakHashMap
dup
invokespecial java.util.WeakHashMap.<init>:()V
putfield org.glassfish.grizzly.nio.SelectorRunner.spinnedSelectorsHistory:Ljava/util/Map;
6: aload 0
aload 1
putfield org.glassfish.grizzly.nio.SelectorRunner.transport:Lorg/glassfish/grizzly/nio/NIOTransport;
7: aload 0
aload 2
putfield org.glassfish.grizzly.nio.SelectorRunner.selector:Ljava/nio/channels/Selector;
8: aload 0
new java.util.concurrent.atomic.AtomicReference
dup
getstatic org.glassfish.grizzly.Transport$State.STOPPED:Lorg/glassfish/grizzly/Transport$State;
invokespecial java.util.concurrent.atomic.AtomicReference.<init>:(Ljava/lang/Object;)V
putfield org.glassfish.grizzly.nio.SelectorRunner.stateHolder:Ljava/util/concurrent/atomic/AtomicReference;
9: aload 0
new java.util.concurrent.ConcurrentLinkedQueue
dup
invokespecial java.util.concurrent.ConcurrentLinkedQueue.<init>:()V
putfield org.glassfish.grizzly.nio.SelectorRunner.pendingTasks:Ljava/util/Queue;
10: aload 0
new java.util.ArrayDeque
dup
invokespecial java.util.ArrayDeque.<init>:()V
putfield org.glassfish.grizzly.nio.SelectorRunner.evenPostponedTasks:Ljava/util/Queue;
11: aload 0
new java.util.ArrayDeque
dup
invokespecial java.util.ArrayDeque.<init>:()V
putfield org.glassfish.grizzly.nio.SelectorRunner.oddPostponedTasks:Ljava/util/Queue;
12: aload 0
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.evenPostponedTasks:Ljava/util/Queue;
putfield org.glassfish.grizzly.nio.SelectorRunner.currentPostponedTasks:Ljava/util/Queue;
13: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
0 14 1 transport Lorg/glassfish/grizzly/nio/NIOTransport;
0 14 2 selector Ljava/nio/channels/Selector;
MethodParameters:
Name Flags
transport final
selector final
void addPendingTask(org.glassfish.grizzly.nio.SelectorHandlerTask);
descriptor: (Lorg/glassfish/grizzly/nio/SelectorHandlerTask;)V
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.pendingTasks:Ljava/util/Queue;
aload 1
invokeinterface java.util.Queue.offer:(Ljava/lang/Object;)Z
pop
1: aload 0
iconst_1
putfield org.glassfish.grizzly.nio.SelectorRunner.hasPendingTasks:Z
2: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.wakeupSelector:()V
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
0 4 1 task Lorg/glassfish/grizzly/nio/SelectorHandlerTask;
MethodParameters:
Name Flags
task final
private void wakeupSelector();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=1
start local 0 0: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.getSelector:()Ljava/nio/channels/Selector;
astore 1
start local 1 1: aload 1
ifnull 6
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.selectorWakeupFlag:Ljava/util/concurrent/atomic/AtomicBoolean;
iconst_0
iconst_1
invokevirtual java.util.concurrent.atomic.AtomicBoolean.compareAndSet:(ZZ)Z
ifeq 6
2: aload 1
invokevirtual java.nio.channels.Selector.wakeup:()Ljava/nio/channels/Selector;
pop
3: goto 6
StackMap locals: org.glassfish.grizzly.nio.SelectorRunner java.nio.channels.Selector
StackMap stack: java.lang.Exception
4: astore 2
start local 2 5: getstatic org.glassfish.grizzly.nio.SelectorRunner.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
ldc "Error during selector wakeup"
aload 2
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
end local 2 6: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
1 7 1 localSelector Ljava/nio/channels/Selector;
5 6 2 e Ljava/lang/Exception;
Exception table:
from to target type
2 3 4 Class java.lang.Exception
public org.glassfish.grizzly.nio.NIOTransport getTransport();
descriptor: ()Lorg/glassfish/grizzly/nio/NIOTransport;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.transport:Lorg/glassfish/grizzly/nio/NIOTransport;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
public java.nio.channels.Selector getSelector();
descriptor: ()Ljava/nio/channels/Selector;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.dumbVolatile:I
ifeq 2
1: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.selector:Ljava/nio/channels/Selector;
areturn
2: StackMap locals:
StackMap stack:
aconst_null
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
void setSelector(java.nio.channels.Selector);
descriptor: (Ljava/nio/channels/Selector;)V
flags: (0x0000)
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield org.glassfish.grizzly.nio.SelectorRunner.selector:Ljava/nio/channels/Selector;
1: aload 0
dup
getfield org.glassfish.grizzly.nio.SelectorRunner.dumbVolatile:I
iconst_1
iadd
putfield org.glassfish.grizzly.nio.SelectorRunner.dumbVolatile:I
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
0 3 1 selector Ljava/nio/channels/Selector;
MethodParameters:
Name Flags
selector final
private void setRunnerThread(java.lang.Thread);
descriptor: (Ljava/lang/Thread;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield org.glassfish.grizzly.nio.SelectorRunner.selectorRunnerThread:Ljava/lang/Thread;
1: aload 0
dup
getfield org.glassfish.grizzly.nio.SelectorRunner.dumbVolatile:I
iconst_1
iadd
putfield org.glassfish.grizzly.nio.SelectorRunner.dumbVolatile:I
2: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
0 3 1 runnerThread Ljava/lang/Thread;
MethodParameters:
Name Flags
runnerThread final
public java.lang.Thread getRunnerThread();
descriptor: ()Ljava/lang/Thread;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.dumbVolatile:I
ifeq 2
1: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.selectorRunnerThread:Ljava/lang/Thread;
areturn
2: StackMap locals:
StackMap stack:
aconst_null
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
public org.glassfish.grizzly.Transport$State getState();
descriptor: ()Lorg/glassfish/grizzly/Transport$State;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.stateHolder:Ljava/util/concurrent/atomic/AtomicReference;
invokevirtual java.util.concurrent.atomic.AtomicReference.get:()Ljava/lang/Object;
checkcast org.glassfish.grizzly.Transport$State
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
public void postpone();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: getstatic org.glassfish.grizzly.nio.SelectorRunner.$assertionsDisabled:Z
ifne 1
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.selectorRunnerThread:Ljava/lang/Thread;
ifnonnull 1
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.selectorRunnerThread:Ljava/lang/Thread;
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.removeThreadNameMarker:(Ljava/lang/Thread;)V
2: iconst_0
invokestatic org.glassfish.grizzly.threadpool.Threads.setService:(Z)V
3: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.runnerThreadActivityCounter:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_1
iconst_0
invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
pop
4: aload 0
aconst_null
putfield org.glassfish.grizzly.nio.SelectorRunner.selectorRunnerThread:Ljava/lang/Thread;
5: aload 0
iconst_1
putfield org.glassfish.grizzly.nio.SelectorRunner.isResume:Z
6: aload 0
dup
getfield org.glassfish.grizzly.nio.SelectorRunner.dumbVolatile:I
iconst_1
iadd
putfield org.glassfish.grizzly.nio.SelectorRunner.dumbVolatile:I
7: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
public synchronized void start();
descriptor: ()V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.stateHolder:Ljava/util/concurrent/atomic/AtomicReference;
getstatic org.glassfish.grizzly.Transport$State.STOPPED:Lorg/glassfish/grizzly/Transport$State;
getstatic org.glassfish.grizzly.Transport$State.STARTING:Lorg/glassfish/grizzly/Transport$State;
invokevirtual java.util.concurrent.atomic.AtomicReference.compareAndSet:(Ljava/lang/Object;Ljava/lang/Object;)Z
ifne 3
1: getstatic org.glassfish.grizzly.nio.SelectorRunner.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.WARNING:Ljava/util/logging/Level;
invokestatic org.glassfish.grizzly.localization.LogMessages.WARNING_GRIZZLY_SELECTOR_RUNNER_NOT_IN_STOPPED_STATE_EXCEPTION:()Ljava/lang/String;
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;)V
2: return
3: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.transport:Lorg/glassfish/grizzly/nio/NIOTransport;
invokevirtual org.glassfish.grizzly.nio.NIOTransport.getKernelThreadPool:()Ljava/util/concurrent/ExecutorService;
aload 0
invokeinterface java.util.concurrent.ExecutorService.execute:(Ljava/lang/Runnable;)V
4: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
public synchronized void stop();
descriptor: ()V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.stateHolder:Ljava/util/concurrent/atomic/AtomicReference;
getstatic org.glassfish.grizzly.Transport$State.STOPPING:Lorg/glassfish/grizzly/Transport$State;
invokevirtual java.util.concurrent.atomic.AtomicReference.set:(Ljava/lang/Object;)V
1: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.wakeupSelector:()V
2: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.runnerThreadActivityCounter:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_0
iconst_m1
invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
ifeq 4
3: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.shutdownSelector:()V
4: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
private void shutdownSelector();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=9, args_size=1
start local 0 0: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.getSelector:()Ljava/nio/channels/Selector;
astore 1
start local 1 1: aload 1
ifnull 26
2: iconst_0
anewarray java.nio.channels.SelectionKey
astore 2
start local 2 3: StackMap locals: java.nio.channels.Selector java.nio.channels.SelectionKey[]
StackMap stack:
aload 1
invokevirtual java.nio.channels.Selector.keys:()Ljava/util/Set;
aload 2
invokeinterface java.util.Set.toArray:([Ljava/lang/Object;)[Ljava/lang/Object;
checkcast java.nio.channels.SelectionKey[]
astore 2
4: goto 7
5: StackMap locals:
StackMap stack: java.util.ConcurrentModificationException
pop
6: goto 3
7: StackMap locals:
StackMap stack:
aload 2
dup
astore 6
arraylength
istore 5
iconst_0
istore 4
goto 12
StackMap locals: org.glassfish.grizzly.nio.SelectorRunner java.nio.channels.Selector java.nio.channels.SelectionKey[] top int int java.nio.channels.SelectionKey[]
StackMap stack:
8: aload 6
iload 4
aaload
astore 3
start local 3 9: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.transport:Lorg/glassfish/grizzly/nio/NIOTransport;
invokevirtual org.glassfish.grizzly.nio.NIOTransport.getSelectionKeyHandler:()Lorg/glassfish/grizzly/nio/SelectionKeyHandler;
aload 3
invokeinterface org.glassfish.grizzly.nio.SelectionKeyHandler.getConnectionForKey:(Ljava/nio/channels/SelectionKey;)Lorg/glassfish/grizzly/nio/NIOConnection;
astore 7
start local 7 10: aload 7
invokeinterface org.glassfish.grizzly.Connection.terminateSilently:()V
end local 7 end local 3 11: iinc 4 1
StackMap locals:
StackMap stack:
12: iload 4
iload 5
if_icmplt 8
end local 2 13: goto 23
StackMap locals: org.glassfish.grizzly.nio.SelectorRunner java.nio.channels.Selector
StackMap stack: java.nio.channels.ClosedSelectorException
14: pop
15: aload 1
invokevirtual java.nio.channels.Selector.close:()V
16: goto 26
StackMap locals:
StackMap stack: java.lang.Exception
17: pop
goto 26
18: StackMap locals:
StackMap stack: java.lang.Throwable
astore 8
19: aload 1
invokevirtual java.nio.channels.Selector.close:()V
20: goto 22
StackMap locals: org.glassfish.grizzly.nio.SelectorRunner java.nio.channels.Selector top top top top top top java.lang.Throwable
StackMap stack: java.lang.Exception
21: pop
22: StackMap locals:
StackMap stack:
aload 8
athrow
23: StackMap locals: org.glassfish.grizzly.nio.SelectorRunner java.nio.channels.Selector
StackMap stack:
aload 1
invokevirtual java.nio.channels.Selector.close:()V
24: goto 26
StackMap locals:
StackMap stack: java.lang.Exception
25: pop
26: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.pendingTasks:Ljava/util/Queue;
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.abortTasksInQueue:(Ljava/util/Queue;)V
27: aload 0
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.evenPostponedTasks:Ljava/util/Queue;
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.abortTasksInQueue:(Ljava/util/Queue;)V
28: aload 0
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.oddPostponedTasks:Ljava/util/Queue;
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.abortTasksInQueue:(Ljava/util/Queue;)V
29: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 30 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
1 30 1 localSelector Ljava/nio/channels/Selector;
3 13 2 keys [Ljava/nio/channels/SelectionKey;
9 11 3 selectionKey Ljava/nio/channels/SelectionKey;
10 11 7 connection Lorg/glassfish/grizzly/Connection;
Exception table:
from to target type
3 4 5 Class java.util.ConcurrentModificationException
2 13 14 Class java.nio.channels.ClosedSelectorException
15 16 17 Class java.lang.Exception
2 15 18 any
19 20 21 Class java.lang.Exception
23 24 25 Class java.lang.Exception
public void run();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=5, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.runnerThreadActivityCounter:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_0
iconst_1
invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
ifne 2
1: return
2: StackMap locals:
StackMap stack:
invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
astore 1
start local 1 3: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.isResume:Z
ifne 15
4: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.stateHolder:Ljava/util/concurrent/atomic/AtomicReference;
getstatic org.glassfish.grizzly.Transport$State.STARTING:Lorg/glassfish/grizzly/Transport$State;
getstatic org.glassfish.grizzly.Transport$State.STARTED:Lorg/glassfish/grizzly/Transport$State;
invokevirtual java.util.concurrent.atomic.AtomicReference.compareAndSet:(Ljava/lang/Object;Ljava/lang/Object;)Z
ifne 14
5: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.runnerThreadActivityCounter:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_1
iconst_0
invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
pop
6: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.isStop:()Z
ifeq 11
7: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.stateHolder:Ljava/util/concurrent/atomic/AtomicReference;
getstatic org.glassfish.grizzly.Transport$State.STOPPED:Lorg/glassfish/grizzly/Transport$State;
invokevirtual java.util.concurrent.atomic.AtomicReference.set:(Ljava/lang/Object;)V
8: aload 0
aconst_null
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.setRunnerThread:(Ljava/lang/Thread;)V
9: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.runnerThreadActivityCounter:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_0
iconst_m1
invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
ifeq 11
10: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.shutdownSelector:()V
11: StackMap locals: java.lang.Thread
StackMap stack:
aload 0
aload 1
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.removeThreadNameMarker:(Ljava/lang/Thread;)V
12: iconst_0
invokestatic org.glassfish.grizzly.threadpool.Threads.setService:(Z)V
13: return
14: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.addThreadNameMarker:(Ljava/lang/Thread;)V
15: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.setRunnerThread:(Ljava/lang/Thread;)V
16: iconst_1
invokestatic org.glassfish.grizzly.threadpool.Threads.setService:(Z)V
17: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.transport:Lorg/glassfish/grizzly/nio/NIOTransport;
invokevirtual org.glassfish.grizzly.nio.NIOTransport.getState:()Lorg/glassfish/grizzly/utils/StateHolder;
astore 2
start local 2 18: iconst_0
istore 3
start local 3 19: goto 28
20: StackMap locals: org.glassfish.grizzly.utils.StateHolder int
StackMap stack:
aload 2
invokevirtual org.glassfish.grizzly.utils.StateHolder.getState:()Ljava/lang/Object;
getstatic org.glassfish.grizzly.Transport$State.PAUSED:Lorg/glassfish/grizzly/Transport$State;
if_acmpeq 25
21: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.doSelect:()Z
ifeq 22
iconst_0
goto 23
StackMap locals:
StackMap stack:
22: iconst_1
StackMap locals:
StackMap stack: int
23: istore 3
24: goto 28
25: StackMap locals:
StackMap stack:
aload 2
getstatic org.glassfish.grizzly.Transport$State.PAUSED:Lorg/glassfish/grizzly/Transport$State;
aconst_null
invokevirtual org.glassfish.grizzly.utils.StateHolder.notifyWhenStateIsNotEqual:(Ljava/lang/Object;Lorg/glassfish/grizzly/CompletionHandler;)Ljava/util/concurrent/Future;
ldc 5000
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokeinterface java.util.concurrent.Future.get:(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
pop
26: goto 28
StackMap locals:
StackMap stack: java.lang.Exception
27: pop
28: StackMap locals:
StackMap stack:
iload 3
ifne 40
aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.isStop:()Z
ifeq 20
end local 3 end local 2 29: goto 40
StackMap locals: org.glassfish.grizzly.nio.SelectorRunner java.lang.Thread
StackMap stack: java.lang.Throwable
30: astore 4
31: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.runnerThreadActivityCounter:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_1
iconst_0
invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
pop
32: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.isStop:()Z
ifeq 37
33: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.stateHolder:Ljava/util/concurrent/atomic/AtomicReference;
getstatic org.glassfish.grizzly.Transport$State.STOPPED:Lorg/glassfish/grizzly/Transport$State;
invokevirtual java.util.concurrent.atomic.AtomicReference.set:(Ljava/lang/Object;)V
34: aload 0
aconst_null
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.setRunnerThread:(Ljava/lang/Thread;)V
35: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.runnerThreadActivityCounter:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_0
iconst_m1
invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
ifeq 37
36: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.shutdownSelector:()V
37: StackMap locals: org.glassfish.grizzly.nio.SelectorRunner java.lang.Thread top top java.lang.Throwable
StackMap stack:
aload 0
aload 1
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.removeThreadNameMarker:(Ljava/lang/Thread;)V
38: iconst_0
invokestatic org.glassfish.grizzly.threadpool.Threads.setService:(Z)V
39: aload 4
athrow
40: StackMap locals: org.glassfish.grizzly.nio.SelectorRunner java.lang.Thread
StackMap stack:
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.runnerThreadActivityCounter:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_1
iconst_0
invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
pop
41: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.isStop:()Z
ifeq 46
42: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.stateHolder:Ljava/util/concurrent/atomic/AtomicReference;
getstatic org.glassfish.grizzly.Transport$State.STOPPED:Lorg/glassfish/grizzly/Transport$State;
invokevirtual java.util.concurrent.atomic.AtomicReference.set:(Ljava/lang/Object;)V
43: aload 0
aconst_null
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.setRunnerThread:(Ljava/lang/Thread;)V
44: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.runnerThreadActivityCounter:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_0
iconst_m1
invokevirtual java.util.concurrent.atomic.AtomicInteger.compareAndSet:(II)Z
ifeq 46
45: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.shutdownSelector:()V
46: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.removeThreadNameMarker:(Ljava/lang/Thread;)V
47: iconst_0
invokestatic org.glassfish.grizzly.threadpool.Threads.setService:(Z)V
48: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 49 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
3 49 1 currentThread Ljava/lang/Thread;
18 29 2 transportStateHolder Lorg/glassfish/grizzly/utils/StateHolder<Lorg/glassfish/grizzly/Transport$State;>;
19 29 3 isSkipping Z
Exception table:
from to target type
25 26 27 Class java.lang.Exception
3 5 30 any
14 30 30 any
protected boolean doSelect();
descriptor: ()Z
flags: (0x0004) ACC_PROTECTED
Code:
stack=6, locals=3, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.transport:Lorg/glassfish/grizzly/nio/NIOTransport;
invokevirtual org.glassfish.grizzly.nio.NIOTransport.getSelectorHandler:()Lorg/glassfish/grizzly/nio/SelectorHandler;
astore 1
start local 1 1: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.isResume:Z
ifeq 10
2: aload 0
iconst_0
putfield org.glassfish.grizzly.nio.SelectorRunner.isResume:Z
3: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.readyKeySet:Ljava/util/Set;
ifnull 10
4: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.keyReadyOps:I
ifeq 7
5: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents:()Z
ifne 7
6: iconst_0
ireturn
7: StackMap locals: org.glassfish.grizzly.nio.SelectorHandler
StackMap stack:
aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.iterateKeys:()Z
ifne 9
8: iconst_0
ireturn
9: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.readyKeySet:Ljava/util/Set;
invokeinterface java.util.Set.clear:()V
10: StackMap locals:
StackMap stack:
aload 0
iconst_0
putfield org.glassfish.grizzly.nio.SelectorRunner.lastSelectedKeysCount:I
11: aload 1
aload 0
invokeinterface org.glassfish.grizzly.nio.SelectorHandler.preSelect:(Lorg/glassfish/grizzly/nio/SelectorRunner;)Z
ifne 13
12: iconst_0
ireturn
13: StackMap locals:
StackMap stack:
aload 0
aload 1
aload 0
invokeinterface org.glassfish.grizzly.nio.SelectorHandler.select:(Lorg/glassfish/grizzly/nio/SelectorRunner;)Ljava/util/Set;
putfield org.glassfish.grizzly.nio.SelectorRunner.readyKeySet:Ljava/util/Set;
14: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.selectorWakeupFlag:Ljava/util/concurrent/atomic/AtomicBoolean;
iconst_0
invokevirtual java.util.concurrent.atomic.AtomicBoolean.set:(Z)V
15: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.stateHolder:Ljava/util/concurrent/atomic/AtomicReference;
invokevirtual java.util.concurrent.atomic.AtomicReference.get:()Ljava/lang/Object;
getstatic org.glassfish.grizzly.Transport$State.STOPPING:Lorg/glassfish/grizzly/Transport$State;
if_acmpne 17
16: iconst_1
ireturn
17: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.readyKeySet:Ljava/util/Set;
invokeinterface java.util.Set.size:()I
putfield org.glassfish.grizzly.nio.SelectorRunner.lastSelectedKeysCount:I
18: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.lastSelectedKeysCount:I
ifeq 23
19: aload 0
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.readyKeySet:Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
putfield org.glassfish.grizzly.nio.SelectorRunner.iterator:Ljava/util/Iterator;
20: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.iterateKeys:()Z
ifne 22
21: iconst_0
ireturn
22: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.readyKeySet:Ljava/util/Set;
invokeinterface java.util.Set.clear:()V
23: StackMap locals:
StackMap stack:
aload 0
aconst_null
putfield org.glassfish.grizzly.nio.SelectorRunner.readyKeySet:Ljava/util/Set;
24: aload 0
aconst_null
putfield org.glassfish.grizzly.nio.SelectorRunner.iterator:Ljava/util/Iterator;
25: aload 1
aload 0
invokeinterface org.glassfish.grizzly.nio.SelectorHandler.postSelect:(Lorg/glassfish/grizzly/nio/SelectorRunner;)V
26: goto 39
StackMap locals:
StackMap stack: java.nio.channels.ClosedSelectorException
27: astore 2
start local 2 28: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.isRunning:()Z
ifeq 31
29: aload 1
aload 0
invokeinterface org.glassfish.grizzly.nio.SelectorHandler.onSelectorClosed:(Lorg/glassfish/grizzly/nio/SelectorRunner;)Z
ifeq 31
30: iconst_1
ireturn
31: StackMap locals: java.nio.channels.ClosedSelectorException
StackMap stack:
aload 0
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.key:Ljava/nio/channels/SelectionKey;
ldc "Selector was unexpectedly closed"
aload 2
getstatic java.util.logging.Level.SEVERE:Ljava/util/logging/Level;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.dropConnectionDueToException:(Ljava/nio/channels/SelectionKey;Ljava/lang/String;Ljava/lang/Exception;Ljava/util/logging/Level;Ljava/util/logging/Level;)V
end local 2 32: goto 39
33: StackMap locals: org.glassfish.grizzly.nio.SelectorRunner org.glassfish.grizzly.nio.SelectorHandler
StackMap stack: java.lang.Exception
astore 2
start local 2 34: aload 0
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.key:Ljava/nio/channels/SelectionKey;
ldc "doSelect exception"
aload 2
getstatic java.util.logging.Level.SEVERE:Ljava/util/logging/Level;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.dropConnectionDueToException:(Ljava/nio/channels/SelectionKey;Ljava/lang/String;Ljava/lang/Exception;Ljava/util/logging/Level;Ljava/util/logging/Level;)V
end local 2 35: goto 39
36: StackMap locals:
StackMap stack: java.lang.Throwable
astore 2
start local 2 37: getstatic org.glassfish.grizzly.nio.SelectorRunner.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.SEVERE:Ljava/util/logging/Level;
ldc "doSelect exception"
aload 2
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
38: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.transport:Lorg/glassfish/grizzly/nio/NIOTransport;
aload 2
invokevirtual org.glassfish.grizzly.nio.NIOTransport.notifyTransportError:(Ljava/lang/Throwable;)V
end local 2 39: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 40 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
1 40 1 selectorHandler Lorg/glassfish/grizzly/nio/SelectorHandler;
28 32 2 e Ljava/nio/channels/ClosedSelectorException;
34 35 2 e Ljava/lang/Exception;
37 39 2 t Ljava/lang/Throwable;
Exception table:
from to target type
1 6 27 Class java.nio.channels.ClosedSelectorException
7 8 27 Class java.nio.channels.ClosedSelectorException
9 12 27 Class java.nio.channels.ClosedSelectorException
13 16 27 Class java.nio.channels.ClosedSelectorException
17 21 27 Class java.nio.channels.ClosedSelectorException
22 26 27 Class java.nio.channels.ClosedSelectorException
1 6 33 Class java.lang.Exception
7 8 33 Class java.lang.Exception
9 12 33 Class java.lang.Exception
13 16 33 Class java.lang.Exception
17 21 33 Class java.lang.Exception
22 26 33 Class java.lang.Exception
1 6 36 Class java.lang.Throwable
7 8 36 Class java.lang.Throwable
9 12 36 Class java.lang.Throwable
13 16 36 Class java.lang.Throwable
17 21 36 Class java.lang.Throwable
22 26 36 Class java.lang.Throwable
private boolean iterateKeys();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=3, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.iterator:Ljava/util/Iterator;
astore 1
start local 1 1: goto 13
2: StackMap locals: java.util.Iterator
StackMap stack:
aload 0
aload 1
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.nio.channels.SelectionKey
putfield org.glassfish.grizzly.nio.SelectorRunner.key:Ljava/nio/channels/SelectionKey;
3: aload 0
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.key:Ljava/nio/channels/SelectionKey;
invokevirtual java.nio.channels.SelectionKey.readyOps:()I
putfield org.glassfish.grizzly.nio.SelectorRunner.keyReadyOps:I
4: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents:()Z
ifne 13
5: iconst_0
ireturn
6: StackMap locals:
StackMap stack: java.io.IOException
astore 2
start local 2 7: aload 0
iconst_0
putfield org.glassfish.grizzly.nio.SelectorRunner.keyReadyOps:I
8: aload 0
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.key:Ljava/nio/channels/SelectionKey;
new java.lang.StringBuilder
dup
ldc "Unexpected IOException. Channel "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.key:Ljava/nio/channels/SelectionKey;
invokevirtual java.nio.channels.SelectionKey.channel:()Ljava/nio/channels/SelectableChannel;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " will be closed."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
aload 2
getstatic java.util.logging.Level.WARNING:Ljava/util/logging/Level;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.dropConnectionDueToException:(Ljava/nio/channels/SelectionKey;Ljava/lang/String;Ljava/lang/Exception;Ljava/util/logging/Level;Ljava/util/logging/Level;)V
end local 2 9: goto 13
10: StackMap locals:
StackMap stack: java.nio.channels.CancelledKeyException
astore 2
start local 2 11: aload 0
iconst_0
putfield org.glassfish.grizzly.nio.SelectorRunner.keyReadyOps:I
12: aload 0
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.key:Ljava/nio/channels/SelectionKey;
new java.lang.StringBuilder
dup
ldc "Unexpected CancelledKeyException. Channel "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.key:Ljava/nio/channels/SelectionKey;
invokevirtual java.nio.channels.SelectionKey.channel:()Ljava/nio/channels/SelectableChannel;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " will be closed."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
aload 2
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.dropConnectionDueToException:(Ljava/nio/channels/SelectionKey;Ljava/lang/String;Ljava/lang/Exception;Ljava/util/logging/Level;Ljava/util/logging/Level;)V
end local 2 13: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
14: iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
1 15 1 it Ljava/util/Iterator<Ljava/nio/channels/SelectionKey;>;
7 9 2 e Ljava/io/IOException;
11 13 2 e Ljava/nio/channels/CancelledKeyException;
Exception table:
from to target type
2 5 6 Class java.io.IOException
2 5 10 Class java.nio.channels.CancelledKeyException
private boolean iterateKeyEvents();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=11, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.key:Ljava/nio/channels/SelectionKey;
astore 1
start local 1 1: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.transport:Lorg/glassfish/grizzly/nio/NIOTransport;
invokevirtual org.glassfish.grizzly.nio.NIOTransport.getSelectionKeyHandler:()Lorg/glassfish/grizzly/nio/SelectionKeyHandler;
astore 2
start local 2 2: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.transport:Lorg/glassfish/grizzly/nio/NIOTransport;
invokevirtual org.glassfish.grizzly.nio.NIOTransport.getIOStrategy:()Lorg/glassfish/grizzly/IOStrategy;
astore 3
start local 3 3: aload 2
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.keyReadyOps:I
invokeinterface org.glassfish.grizzly.nio.SelectionKeyHandler.getIOEvents:(I)[Lorg/glassfish/grizzly/IOEvent;
astore 4
start local 4 4: aload 2
aload 1
invokeinterface org.glassfish.grizzly.nio.SelectionKeyHandler.getConnectionForKey:(Ljava/nio/channels/SelectionKey;)Lorg/glassfish/grizzly/nio/NIOConnection;
astore 5
start local 5 5: aload 4
dup
astore 9
arraylength
istore 8
iconst_0
istore 7
goto 14
StackMap locals: org.glassfish.grizzly.nio.SelectorRunner java.nio.channels.SelectionKey org.glassfish.grizzly.nio.SelectionKeyHandler org.glassfish.grizzly.IOStrategy org.glassfish.grizzly.IOEvent[] org.glassfish.grizzly.nio.NIOConnection top int int org.glassfish.grizzly.IOEvent[]
StackMap stack:
6: aload 9
iload 7
aaload
astore 6
start local 6 7: aload 5
aload 6
invokestatic org.glassfish.grizzly.nio.NIOConnection.notifyIOEventReady:(Lorg/glassfish/grizzly/nio/NIOConnection;Lorg/glassfish/grizzly/IOEvent;)V
8: aload 6
invokevirtual org.glassfish.grizzly.IOEvent.getSelectionKeyInterest:()I
istore 10
start local 10 9: aload 0
dup
getfield org.glassfish.grizzly.nio.SelectorRunner.keyReadyOps:I
iload 10
iconst_m1
ixor
iand
putfield org.glassfish.grizzly.nio.SelectorRunner.keyReadyOps:I
10: aload 2
aload 1
iload 10
invokeinterface org.glassfish.grizzly.nio.SelectionKeyHandler.onProcessInterest:(Ljava/nio/channels/SelectionKey;I)Z
ifeq 13
11: aload 3
aload 5
aload 6
invokeinterface org.glassfish.grizzly.IOStrategy.executeIoEvent:(Lorg/glassfish/grizzly/Connection;Lorg/glassfish/grizzly/IOEvent;)Z
ifne 13
12: iconst_0
ireturn
end local 10 end local 6 13: StackMap locals:
StackMap stack:
iinc 7 1
StackMap locals:
StackMap stack:
14: iload 7
iload 8
if_icmplt 6
15: iconst_1
ireturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
1 16 1 keyLocal Ljava/nio/channels/SelectionKey;
2 16 2 selectionKeyHandler Lorg/glassfish/grizzly/nio/SelectionKeyHandler;
3 16 3 ioStrategy Lorg/glassfish/grizzly/IOStrategy;
4 16 4 ioEvents [Lorg/glassfish/grizzly/IOEvent;
5 16 5 connection Lorg/glassfish/grizzly/nio/NIOConnection;
7 13 6 ioEvent Lorg/glassfish/grizzly/IOEvent;
9 13 10 interest I
Exceptions:
throws java.io.IOException
public java.util.Queue<org.glassfish.grizzly.nio.SelectorHandlerTask> getPendingTasks();
descriptor: ()Ljava/util/Queue;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
iconst_0
putfield org.glassfish.grizzly.nio.SelectorRunner.hasPendingTasks:Z
1: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.pendingTasks:Ljava/util/Queue;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
Signature: ()Ljava/util/Queue<Lorg/glassfish/grizzly/nio/SelectorHandlerTask;>;
public java.util.Queue<org.glassfish.grizzly.nio.SelectorHandlerTask> getPostponedTasks();
descriptor: ()Ljava/util/Queue;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.currentPostponedTasks:Ljava/util/Queue;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
Signature: ()Ljava/util/Queue<Lorg/glassfish/grizzly/nio/SelectorHandlerTask;>;
public java.util.Queue<org.glassfish.grizzly.nio.SelectorHandlerTask> obtainPostponedTasks();
descriptor: ()Ljava/util/Queue;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.currentPostponedTasks:Ljava/util/Queue;
astore 1
start local 1 1: aload 0
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.currentPostponedTasks:Ljava/util/Queue;
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.evenPostponedTasks:Ljava/util/Queue;
if_acmpne 2
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.oddPostponedTasks:Ljava/util/Queue;
goto 3
StackMap locals: org.glassfish.grizzly.nio.SelectorRunner java.util.Queue
StackMap stack: org.glassfish.grizzly.nio.SelectorRunner
2: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.evenPostponedTasks:Ljava/util/Queue;
StackMap locals: org.glassfish.grizzly.nio.SelectorRunner java.util.Queue
StackMap stack: org.glassfish.grizzly.nio.SelectorRunner java.util.Queue
3: putfield org.glassfish.grizzly.nio.SelectorRunner.currentPostponedTasks:Ljava/util/Queue;
4: aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
1 5 1 tasksToReturn Ljava/util/Queue<Lorg/glassfish/grizzly/nio/SelectorHandlerTask;>;
Signature: ()Ljava/util/Queue<Lorg/glassfish/grizzly/nio/SelectorHandlerTask;>;
boolean isStop();
descriptor: ()Z
flags: (0x0000)
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.stateHolder:Ljava/util/concurrent/atomic/AtomicReference;
invokevirtual java.util.concurrent.atomic.AtomicReference.get:()Ljava/lang/Object;
checkcast org.glassfish.grizzly.Transport$State
astore 1
start local 1 1: aload 1
getstatic org.glassfish.grizzly.Transport$State.STOPPED:Lorg/glassfish/grizzly/Transport$State;
if_acmpeq 2
aload 1
getstatic org.glassfish.grizzly.Transport$State.STOPPING:Lorg/glassfish/grizzly/Transport$State;
if_acmpeq 2
iconst_0
ireturn
StackMap locals: org.glassfish.grizzly.Transport$State
StackMap stack:
2: iconst_1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
1 3 1 state Lorg/glassfish/grizzly/Transport$State;
private boolean isRunning();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.stateHolder:Ljava/util/concurrent/atomic/AtomicReference;
invokevirtual java.util.concurrent.atomic.AtomicReference.get:()Ljava/lang/Object;
getstatic org.glassfish.grizzly.Transport$State.STARTED:Lorg/glassfish/grizzly/Transport$State;
if_acmpne 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
private void dropConnectionDueToException(java.nio.channels.SelectionKey, java.lang.String, java.lang.Exception, java.util.logging.Level, java.util.logging.Level);
descriptor: (Ljava/nio/channels/SelectionKey;Ljava/lang/String;Ljava/lang/Exception;Ljava/util/logging/Level;Ljava/util/logging/Level;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=8, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.isRunning:()Z
ifeq 15
1: getstatic org.glassfish.grizzly.nio.SelectorRunner.LOGGER:Ljava/util/logging/Logger;
aload 4
aload 2
aload 3
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
2: aload 1
ifnull 13
3: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.transport:Lorg/glassfish/grizzly/nio/NIOTransport;
invokevirtual org.glassfish.grizzly.nio.NIOTransport.getSelectionKeyHandler:()Lorg/glassfish/grizzly/nio/SelectionKeyHandler;
aload 1
invokeinterface org.glassfish.grizzly.nio.SelectionKeyHandler.getConnectionForKey:(Ljava/nio/channels/SelectionKey;)Lorg/glassfish/grizzly/nio/NIOConnection;
astore 6
start local 6 4: aload 6
ifnull 7
5: aload 6
invokeinterface org.glassfish.grizzly.Connection.closeSilently:()V
6: goto 13
7: StackMap locals: org.glassfish.grizzly.Connection
StackMap stack:
aload 1
invokevirtual java.nio.channels.SelectionKey.channel:()Ljava/nio/channels/SelectableChannel;
astore 7
start local 7 8: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.transport:Lorg/glassfish/grizzly/nio/NIOTransport;
invokevirtual org.glassfish.grizzly.nio.NIOTransport.getSelectionKeyHandler:()Lorg/glassfish/grizzly/nio/SelectionKeyHandler;
aload 1
invokeinterface org.glassfish.grizzly.nio.SelectionKeyHandler.cancel:(Ljava/nio/channels/SelectionKey;)V
9: aload 7
invokevirtual java.nio.channels.SelectableChannel.close:()V
end local 7 end local 6 10: goto 13
StackMap locals: org.glassfish.grizzly.nio.SelectorRunner java.nio.channels.SelectionKey java.lang.String java.lang.Exception java.util.logging.Level java.util.logging.Level
StackMap stack: java.io.IOException
11: astore 6
start local 6 12: getstatic org.glassfish.grizzly.nio.SelectorRunner.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
ldc "IOException during cancelling key"
aload 6
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
end local 6 13: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.transport:Lorg/glassfish/grizzly/nio/NIOTransport;
aload 3
invokevirtual org.glassfish.grizzly.nio.NIOTransport.notifyTransportError:(Ljava/lang/Throwable;)V
14: goto 16
15: StackMap locals:
StackMap stack:
getstatic org.glassfish.grizzly.nio.SelectorRunner.LOGGER:Ljava/util/logging/Logger;
aload 5
aload 2
aload 3
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
16: StackMap locals:
StackMap stack:
return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
0 17 1 key Ljava/nio/channels/SelectionKey;
0 17 2 description Ljava/lang/String;
0 17 3 e Ljava/lang/Exception;
0 17 4 runLogLevel Ljava/util/logging/Level;
0 17 5 stoppedLogLevel Ljava/util/logging/Level;
4 10 6 connection Lorg/glassfish/grizzly/Connection;
8 10 7 channel Ljava/nio/channels/SelectableChannel;
12 13 6 cancelException Ljava/io/IOException;
Exception table:
from to target type
3 10 11 Class java.io.IOException
MethodParameters:
Name Flags
key final
description final
e final
runLogLevel final
stoppedLogLevel final
public int getLastSelectedKeysCount();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.lastSelectedKeysCount:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
protected void switchToNewSelector();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=9, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.selector:Ljava/nio/channels/Selector;
astore 1
start local 1 1: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.transport:Lorg/glassfish/grizzly/nio/NIOTransport;
invokevirtual org.glassfish.grizzly.nio.NIOTransport.getSelectorProvider:()Ljava/nio/channels/spi/SelectorProvider;
invokestatic org.glassfish.grizzly.nio.Selectors.newSelector:(Ljava/nio/channels/spi/SelectorProvider;)Ljava/nio/channels/Selector;
astore 2
start local 2 2: aload 1
invokevirtual java.nio.channels.Selector.keys:()Ljava/util/Set;
astore 3
start local 3 3: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.transport:Lorg/glassfish/grizzly/nio/NIOTransport;
invokevirtual org.glassfish.grizzly.nio.NIOTransport.getSelectionKeyHandler:()Lorg/glassfish/grizzly/nio/SelectionKeyHandler;
astore 4
start local 4 4: aload 3
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 6
goto 13
StackMap locals: org.glassfish.grizzly.nio.SelectorRunner java.nio.channels.Selector java.nio.channels.Selector java.util.Set org.glassfish.grizzly.nio.SelectionKeyHandler top java.util.Iterator
StackMap stack:
5: aload 6
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.nio.channels.SelectionKey
astore 5
start local 5 6: aload 5
invokevirtual java.nio.channels.SelectionKey.isValid:()Z
ifeq 13
7: aload 4
aload 5
invokeinterface org.glassfish.grizzly.nio.SelectionKeyHandler.getConnectionForKey:(Ljava/nio/channels/SelectionKey;)Lorg/glassfish/grizzly/nio/NIOConnection;
astore 7
start local 7 8: aload 5
invokevirtual java.nio.channels.SelectionKey.channel:()Ljava/nio/channels/SelectableChannel;
aload 2
aload 5
invokevirtual java.nio.channels.SelectionKey.interestOps:()I
aload 5
invokevirtual java.nio.channels.SelectionKey.attachment:()Ljava/lang/Object;
invokevirtual java.nio.channels.SelectableChannel.register:(Ljava/nio/channels/Selector;ILjava/lang/Object;)Ljava/nio/channels/SelectionKey;
astore 8
start local 8 9: aload 7
aload 8
invokevirtual org.glassfish.grizzly.nio.NIOConnection.onSelectionKeyUpdated:(Ljava/nio/channels/SelectionKey;)V
end local 8 end local 7 10: goto 13
StackMap locals: org.glassfish.grizzly.nio.SelectorRunner java.nio.channels.Selector java.nio.channels.Selector java.util.Set org.glassfish.grizzly.nio.SelectionKeyHandler java.nio.channels.SelectionKey java.util.Iterator
StackMap stack: java.lang.Exception
11: astore 7
start local 7 12: getstatic org.glassfish.grizzly.nio.SelectorRunner.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
ldc "Error switching channel to a new selector"
aload 7
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
end local 7 end local 5 13: StackMap locals: org.glassfish.grizzly.nio.SelectorRunner java.nio.channels.Selector java.nio.channels.Selector java.util.Set org.glassfish.grizzly.nio.SelectionKeyHandler top java.util.Iterator
StackMap stack:
aload 6
invokeinterface java.util.Iterator.hasNext:()Z
ifne 5
14: aload 0
aload 2
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.setSelector:(Ljava/nio/channels/Selector;)V
15: aload 1
invokevirtual java.nio.channels.Selector.close:()V
16: goto 18
StackMap locals: org.glassfish.grizzly.nio.SelectorRunner java.nio.channels.Selector java.nio.channels.Selector java.util.Set org.glassfish.grizzly.nio.SelectionKeyHandler
StackMap stack: java.lang.Exception
17: pop
18: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
1 19 1 oldSelector Ljava/nio/channels/Selector;
2 19 2 newSelector Ljava/nio/channels/Selector;
3 19 3 keys Ljava/util/Set<Ljava/nio/channels/SelectionKey;>;
4 19 4 selectionKeyHandler Lorg/glassfish/grizzly/nio/SelectionKeyHandler;
6 13 5 selectionKey Ljava/nio/channels/SelectionKey;
8 10 7 nioConnection Lorg/glassfish/grizzly/nio/NIOConnection;
9 10 8 newSelectionKey Ljava/nio/channels/SelectionKey;
12 13 7 e Ljava/lang/Exception;
Exception table:
from to target type
7 10 11 Class java.lang.Exception
15 16 17 Class java.lang.Exception
Exceptions:
throws java.io.IOException
private void abortTasksInQueue(java.util.Queue<org.glassfish.grizzly.nio.SelectorHandlerTask>);
descriptor: (Ljava/util/Queue;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: goto 4
start local 2 1: StackMap locals: org.glassfish.grizzly.nio.SelectorHandlerTask
StackMap stack:
aload 2
invokeinterface org.glassfish.grizzly.nio.SelectorHandlerTask.cancel:()V
2: goto 4
StackMap locals:
StackMap stack: java.lang.Exception
3: pop
end local 2 4: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.util.Queue.poll:()Ljava/lang/Object;
checkcast org.glassfish.grizzly.nio.SelectorHandlerTask
dup
astore 2
start local 2 5: ifnonnull 1
6: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
0 7 1 taskQueue Ljava/util/Queue<Lorg/glassfish/grizzly/nio/SelectorHandlerTask;>;
1 4 2 task Lorg/glassfish/grizzly/nio/SelectorHandlerTask;
5 7 2 task Lorg/glassfish/grizzly/nio/SelectorHandlerTask;
Exception table:
from to target type
1 2 3 Class java.lang.Exception
Signature: (Ljava/util/Queue<Lorg/glassfish/grizzly/nio/SelectorHandlerTask;>;)V
MethodParameters:
Name Flags
taskQueue final
void resetSpinCounter();
descriptor: ()V
flags: (0x0000)
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
iconst_0
putfield org.glassfish.grizzly.nio.SelectorRunner.emptySpinCounter:I
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
int incSpinCounter();
descriptor: ()I
flags: (0x0000)
Code:
stack=4, locals=4, args_size=1
start local 0 0: aload 0
dup
getfield org.glassfish.grizzly.nio.SelectorRunner.emptySpinCounter:I
dup_x1
iconst_1
iadd
putfield org.glassfish.grizzly.nio.SelectorRunner.emptySpinCounter:I
ifne 3
1: aload 0
invokestatic java.lang.System.nanoTime:()J
putfield org.glassfish.grizzly.nio.SelectorRunner.lastSpinTimestamp:J
2: goto 8
StackMap locals:
StackMap stack:
3: aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.emptySpinCounter:I
sipush 1000
if_icmpne 8
4: invokestatic java.lang.System.nanoTime:()J
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.lastSpinTimestamp:J
lsub
lstore 1
start local 1 5: ldc 1000000000000
lload 1
ldiv
l2i
istore 3
start local 3 6: aload 0
iconst_0
putfield org.glassfish.grizzly.nio.SelectorRunner.emptySpinCounter:I
7: iload 3
ireturn
end local 3 end local 1 8: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
5 8 1 deltatime J
6 8 3 contspinspersec I
java.nio.channels.SelectionKey checkIfSpinnedKey(java.nio.channels.SelectionKey);
descriptor: (Ljava/nio/channels/SelectionKey;)Ljava/nio/channels/SelectionKey;
flags: (0x0000)
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.nio.channels.SelectionKey.isValid:()Z
ifne 4
aload 1
invokevirtual java.nio.channels.SelectionKey.channel:()Ljava/nio/channels/SelectableChannel;
invokevirtual java.nio.channels.SelectableChannel.isOpen:()Z
ifeq 4
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.spinnedSelectorsHistory:Ljava/util/Map;
aload 1
invokevirtual java.nio.channels.SelectionKey.selector:()Ljava/nio/channels/Selector;
invokeinterface java.util.Map.containsKey:(Ljava/lang/Object;)Z
ifeq 4
1: aload 1
invokevirtual java.nio.channels.SelectionKey.channel:()Ljava/nio/channels/SelectableChannel;
aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.getSelector:()Ljava/nio/channels/Selector;
invokevirtual java.nio.channels.SelectableChannel.keyFor:(Ljava/nio/channels/Selector;)Ljava/nio/channels/SelectionKey;
astore 2
start local 2 2: aload 2
aload 1
invokevirtual java.nio.channels.SelectionKey.attachment:()Ljava/lang/Object;
invokevirtual java.nio.channels.SelectionKey.attach:(Ljava/lang/Object;)Ljava/lang/Object;
pop
3: aload 2
areturn
end local 2 4: StackMap locals:
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
0 5 1 key Ljava/nio/channels/SelectionKey;
2 4 2 newKey Ljava/nio/channels/SelectionKey;
MethodParameters:
Name Flags
key final
void workaroundSelectorSpin();
descriptor: ()V
flags: (0x0000)
Code:
stack=4, locals=1, args_size=1
start local 0 0: getstatic org.glassfish.grizzly.nio.SelectorRunner.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
invokevirtual java.util.logging.Logger.isLoggable:(Ljava/util/logging/Level;)Z
ifeq 2
1: getstatic org.glassfish.grizzly.nio.SelectorRunner.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
ldc "Workaround selector spin. selector={0}"
aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.getSelector:()Ljava/nio/channels/Selector;
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Object;)V
2: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.nio.SelectorRunner.spinnedSelectorsHistory:Ljava/util/Map;
aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.getSelector:()Ljava/nio/channels/Selector;
invokestatic java.lang.System.currentTimeMillis:()J
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
3: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.switchToNewSelector:()V
4: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
Exceptions:
throws java.io.IOException
void checkSelectorSpin(boolean, int);
descriptor: (ZI)V
flags: (0x0000)
Code:
stack=4, locals=5, args_size=3
start local 0 start local 1 start local 2 0: iload 1
ifeq 3
1: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.resetSpinCounter:()V
2: goto 6
3: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.incSpinCounter:()I
i2l
lstore 3
start local 3 4: lload 3
iload 2
i2l
lcmp
ifle 6
5: aload 0
invokevirtual org.glassfish.grizzly.nio.SelectorRunner.workaroundSelectorSpin:()V
end local 3 6: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
0 7 1 hasSelectedKeys Z
0 7 2 spinRateThreshold I
4 6 3 sr J
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
hasSelectedKeys final
spinRateThreshold final
private void addThreadNameMarker(java.lang.Thread);
descriptor: (Ljava/lang/Thread;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.lang.Thread.getName:()Ljava/lang/String;
astore 2
start local 2 1: aload 2
ldc " SelectorRunner"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifne 3
2: aload 1
new java.lang.StringBuilder
dup
aload 2
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " SelectorRunner"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.lang.Thread.setName:(Ljava/lang/String;)V
3: StackMap locals: java.lang.String
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
0 4 1 currentThread Ljava/lang/Thread;
1 4 2 name Ljava/lang/String;
MethodParameters:
Name Flags
currentThread final
private void removeThreadNameMarker(java.lang.Thread);
descriptor: (Ljava/lang/Thread;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.lang.Thread.getName:()Ljava/lang/String;
astore 2
start local 2 1: aload 2
ldc " SelectorRunner"
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifeq 3
2: aload 1
aload 2
iconst_0
aload 2
invokevirtual java.lang.String.length:()I
ldc " SelectorRunner"
invokevirtual java.lang.String.length:()I
isub
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
invokevirtual java.lang.Thread.setName:(Ljava/lang/String;)V
3: StackMap locals: java.lang.String
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/glassfish/grizzly/nio/SelectorRunner;
0 4 1 currentThread Ljava/lang/Thread;
1 4 2 name Ljava/lang/String;
MethodParameters:
Name Flags
currentThread final
}
SourceFile: "SelectorRunner.java"
InnerClasses:
public final State = org.glassfish.grizzly.Transport$State of org.glassfish.grizzly.Transport