public class org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool
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
public static final int DEFAULT_SELECTORS_COUNT;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 32
private static final int MISS_THRESHOLD;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 10000
private volatile int maxPoolSize;
descriptor: I
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private final java.util.concurrent.atomic.AtomicBoolean isClosed;
descriptor: Ljava/util/concurrent/atomic/AtomicBoolean;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.Queue<java.nio.channels.Selector> selectors;
descriptor: Ljava/util/Queue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Queue<Ljava/nio/channels/Selector;>;
private final java.util.concurrent.atomic.AtomicInteger poolSize;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.atomic.AtomicInteger missesCounter;
descriptor: Ljava/util/concurrent/atomic/AtomicInteger;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.nio.channels.spi.SelectorProvider selectorProvider;
descriptor: Ljava/nio/channels/spi/SelectorProvider;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/glassfish/grizzly/nio/tmpselectors/TemporarySelectorPool;
invokestatic org.glassfish.grizzly.Grizzly.logger:(Ljava/lang/Class;)Ljava/util/logging/Logger;
putstatic org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.LOGGER:Ljava/util/logging/Logger;
1: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(java.nio.channels.spi.SelectorProvider);
descriptor: (Ljava/nio/channels/spi/SelectorProvider;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
bipush 32
invokespecial org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.<init>:(Ljava/nio/channels/spi/SelectorProvider;I)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/glassfish/grizzly/nio/tmpselectors/TemporarySelectorPool;
0 2 1 selectorProvider Ljava/nio/channels/spi/SelectorProvider;
MethodParameters:
Name Flags
selectorProvider final
public void <init>(java.nio.channels.spi.SelectorProvider, int);
descriptor: (Ljava/nio/channels/spi/SelectorProvider;I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, 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
aload 1
putfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.selectorProvider:Ljava/nio/channels/spi/SelectorProvider;
2: aload 0
iload 2
putfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.maxPoolSize:I
3: aload 0
new java.util.concurrent.atomic.AtomicBoolean
dup
invokespecial java.util.concurrent.atomic.AtomicBoolean.<init>:()V
putfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.isClosed:Ljava/util/concurrent/atomic/AtomicBoolean;
4: aload 0
new java.util.concurrent.ConcurrentLinkedQueue
dup
invokespecial java.util.concurrent.ConcurrentLinkedQueue.<init>:()V
putfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.selectors:Ljava/util/Queue;
5: aload 0
new java.util.concurrent.atomic.AtomicInteger
dup
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:()V
putfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.poolSize:Ljava/util/concurrent/atomic/AtomicInteger;
6: aload 0
new java.util.concurrent.atomic.AtomicInteger
dup
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:()V
putfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.missesCounter:Ljava/util/concurrent/atomic/AtomicInteger;
7: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/glassfish/grizzly/nio/tmpselectors/TemporarySelectorPool;
0 8 1 selectorProvider Ljava/nio/channels/spi/SelectorProvider;
0 8 2 selectorsCount I
MethodParameters:
Name Flags
selectorProvider final
selectorsCount final
public synchronized int size();
descriptor: ()I
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.maxPoolSize:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/nio/tmpselectors/TemporarySelectorPool;
public synchronized void setSize(int);
descriptor: (I)V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.isClosed:Ljava/util/concurrent/atomic/AtomicBoolean;
invokevirtual java.util.concurrent.atomic.AtomicBoolean.get:()Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.missesCounter:Ljava/util/concurrent/atomic/AtomicInteger;
iconst_0
invokevirtual java.util.concurrent.atomic.AtomicInteger.set:(I)V
3: aload 0
iload 1
putfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.maxPoolSize:I
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/glassfish/grizzly/nio/tmpselectors/TemporarySelectorPool;
0 5 1 size I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
size
public java.nio.channels.spi.SelectorProvider getSelectorProvider();
descriptor: ()Ljava/nio/channels/spi/SelectorProvider;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.selectorProvider:Ljava/nio/channels/spi/SelectorProvider;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/glassfish/grizzly/nio/tmpselectors/TemporarySelectorPool;
public java.nio.channels.Selector poll();
descriptor: ()Ljava/nio/channels/Selector;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.selectors:Ljava/util/Queue;
invokeinterface java.util.Queue.poll:()Ljava/lang/Object;
checkcast java.nio.channels.Selector
astore 1
start local 1 1: aload 1
ifnull 4
2: aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.poolSize:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.decrementAndGet:()I
pop
3: goto 11
4: StackMap locals: java.nio.channels.Selector
StackMap stack:
aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.selectorProvider:Ljava/nio/channels/spi/SelectorProvider;
invokestatic org.glassfish.grizzly.nio.Selectors.newSelector:(Ljava/nio/channels/spi/SelectorProvider;)Ljava/nio/channels/Selector;
astore 1
5: goto 8
StackMap locals:
StackMap stack: java.io.IOException
6: astore 2
start local 2 7: getstatic org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.WARNING:Ljava/util/logging/Level;
invokestatic org.glassfish.grizzly.localization.LogMessages.WARNING_GRIZZLY_TEMPORARY_SELECTOR_POOL_CREATE_SELECTOR_EXCEPTION:()Ljava/lang/String;
aload 2
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
end local 2 8: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.missesCounter:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.incrementAndGet:()I
istore 2
start local 2 9: iload 2
sipush 10000
irem
ifne 11
10: getstatic org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.WARNING:Ljava/util/logging/Level;
iload 2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.maxPoolSize:I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
invokestatic org.glassfish.grizzly.localization.LogMessages.WARNING_GRIZZLY_TEMPORARY_SELECTOR_POOL_MISSES_EXCEPTION:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/String;
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;)V
end local 2 11: StackMap locals:
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/glassfish/grizzly/nio/tmpselectors/TemporarySelectorPool;
1 12 1 selector Ljava/nio/channels/Selector;
7 8 2 e Ljava/io/IOException;
9 11 2 missesCount I
Exception table:
from to target type
4 5 6 Class java.io.IOException
Exceptions:
throws java.io.IOException
public void offer(java.nio.channels.Selector);
descriptor: (Ljava/nio/channels/Selector;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 1
ifnonnull 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.poolSize:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.getAndIncrement:()I
aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.maxPoolSize:I
if_icmpge 6
aload 0
aload 1
invokevirtual org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.checkSelector:(Ljava/nio/channels/Selector;)Ljava/nio/channels/Selector;
dup
astore 1
ifnull 6
3: aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.selectors:Ljava/util/Queue;
aload 1
invokeinterface java.util.Queue.offer:(Ljava/lang/Object;)Z
pop
4: iconst_1
istore 2
start local 2 5: goto 10
end local 2 6: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.poolSize:Ljava/util/concurrent/atomic/AtomicInteger;
invokevirtual java.util.concurrent.atomic.AtomicInteger.decrementAndGet:()I
pop
7: aload 1
ifnonnull 9
8: return
9: StackMap locals:
StackMap stack:
iconst_0
istore 2
start local 2 10: StackMap locals: int
StackMap stack:
aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.isClosed:Ljava/util/concurrent/atomic/AtomicBoolean;
invokevirtual java.util.concurrent.atomic.AtomicBoolean.get:()Z
ifeq 14
11: aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.selectors:Ljava/util/Queue;
aload 1
invokeinterface java.util.Queue.remove:(Ljava/lang/Object;)Z
ifeq 16
12: aload 0
aload 1
invokevirtual org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.closeSelector:(Ljava/nio/channels/Selector;)V
13: goto 16
StackMap locals:
StackMap stack:
14: iload 2
ifne 16
15: aload 0
aload 1
invokevirtual org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.closeSelector:(Ljava/nio/channels/Selector;)V
16: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lorg/glassfish/grizzly/nio/tmpselectors/TemporarySelectorPool;
0 17 1 selector Ljava/nio/channels/Selector;
5 6 2 wasReturned Z
10 17 2 wasReturned Z
MethodParameters:
Name Flags
selector
public synchronized void close();
descriptor: ()V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.isClosed:Ljava/util/concurrent/atomic/AtomicBoolean;
iconst_1
invokevirtual java.util.concurrent.atomic.AtomicBoolean.getAndSet:(Z)Z
ifne 5
1: goto 3
start local 1 2: StackMap locals: java.nio.channels.Selector
StackMap stack:
aload 0
aload 1
invokevirtual org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.closeSelector:(Ljava/nio/channels/Selector;)V
end local 1 3: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.selectors:Ljava/util/Queue;
invokeinterface java.util.Queue.poll:()Ljava/lang/Object;
checkcast java.nio.channels.Selector
dup
astore 1
start local 1 4: ifnonnull 2
end local 1 5: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/glassfish/grizzly/nio/tmpselectors/TemporarySelectorPool;
2 3 1 selector Ljava/nio/channels/Selector;
4 5 1 selector Ljava/nio/channels/Selector;
private void closeSelector(java.nio.channels.Selector);
descriptor: (Ljava/nio/channels/Selector;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.nio.channels.Selector.close:()V
1: goto 5
StackMap locals:
StackMap stack: java.io.IOException
2: astore 2
start local 2 3: getstatic org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.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 5
4: getstatic org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.FINE:Ljava/util/logging/Level;
ldc "TemporarySelectorFactory: error occurred when trying to close the Selector"
aload 2
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
end local 2 5: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/glassfish/grizzly/nio/tmpselectors/TemporarySelectorPool;
0 6 1 selector Ljava/nio/channels/Selector;
3 5 2 e Ljava/io/IOException;
Exception table:
from to target type
0 1 2 Class java.io.IOException
MethodParameters:
Name Flags
selector
private java.nio.channels.Selector checkSelector(java.nio.channels.Selector);
descriptor: (Ljava/nio/channels/Selector;)Ljava/nio/channels/Selector;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual java.nio.channels.Selector.selectNow:()I
pop
1: aload 1
2: areturn
3: StackMap locals:
StackMap stack: java.io.IOException
astore 2
start local 2 4: getstatic org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.WARNING:Ljava/util/logging/Level;
invokestatic org.glassfish.grizzly.localization.LogMessages.WARNING_GRIZZLY_TEMPORARY_SELECTOR_POOL_SELECTOR_FAILURE_EXCEPTION:()Ljava/lang/String;
aload 2
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
5: aload 0
getfield org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.selectorProvider:Ljava/nio/channels/spi/SelectorProvider;
invokestatic org.glassfish.grizzly.nio.Selectors.newSelector:(Ljava/nio/channels/spi/SelectorProvider;)Ljava/nio/channels/Selector;
6: areturn
7: StackMap locals: org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool java.nio.channels.Selector java.io.IOException
StackMap stack: java.io.IOException
astore 3
start local 3 8: getstatic org.glassfish.grizzly.nio.tmpselectors.TemporarySelectorPool.LOGGER:Ljava/util/logging/Logger;
getstatic java.util.logging.Level.WARNING:Ljava/util/logging/Level;
invokestatic org.glassfish.grizzly.localization.LogMessages.WARNING_GRIZZLY_TEMPORARY_SELECTOR_POOL_CREATE_SELECTOR_EXCEPTION:()Ljava/lang/String;
aload 3
invokevirtual java.util.logging.Logger.log:(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
end local 3 end local 2 9: aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/glassfish/grizzly/nio/tmpselectors/TemporarySelectorPool;
0 10 1 selector Ljava/nio/channels/Selector;
4 9 2 e Ljava/io/IOException;
8 9 3 ee Ljava/io/IOException;
Exception table:
from to target type
0 2 3 Class java.io.IOException
5 6 7 Class java.io.IOException
MethodParameters:
Name Flags
selector final
}
SourceFile: "TemporarySelectorPool.java"