public class org.glassfish.grizzly.threadpool.SyncThreadPool extends org.glassfish.grizzly.threadpool.AbstractThreadPool
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.glassfish.grizzly.threadpool.SyncThreadPool
super_class: org.glassfish.grizzly.threadpool.AbstractThreadPool
{
private final java.util.Queue<java.lang.Runnable> workQueue;
descriptor: Ljava/util/Queue;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Queue<Ljava/lang/Runnable;>;
protected int maxQueuedTasks;
descriptor: I
flags: (0x0004) ACC_PROTECTED
private int currentPoolSize;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private int activeThreadsCount;
descriptor: I
flags: (0x0002) ACC_PRIVATE
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/threadpool/SyncThreadPool;
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.threadpool.SyncThreadPool.$assertionsDisabled:Z
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(org.glassfish.grizzly.threadpool.ThreadPoolConfig);
descriptor: (Lorg/glassfish/grizzly/threadpool/ThreadPoolConfig;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokespecial org.glassfish.grizzly.threadpool.AbstractThreadPool.<init>:(Lorg/glassfish/grizzly/threadpool/ThreadPoolConfig;)V
1: aload 0
iconst_m1
putfield org.glassfish.grizzly.threadpool.SyncThreadPool.maxQueuedTasks:I
2: aload 1
getstatic java.util.concurrent.TimeUnit.MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual org.glassfish.grizzly.threadpool.ThreadPoolConfig.getKeepAliveTime:(Ljava/util/concurrent/TimeUnit;)J
lconst_0
lcmp
ifge 4
3: new java.lang.IllegalArgumentException
dup
ldc "keepAliveTime < 0"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals: org.glassfish.grizzly.threadpool.SyncThreadPool org.glassfish.grizzly.threadpool.ThreadPoolConfig
StackMap stack:
aload 0
aload 1
invokevirtual org.glassfish.grizzly.threadpool.ThreadPoolConfig.getQueue:()Ljava/util/Queue;
ifnull 6
5: aload 1
invokevirtual org.glassfish.grizzly.threadpool.ThreadPoolConfig.getQueue:()Ljava/util/Queue;
goto 7
6: StackMap locals:
StackMap stack: org.glassfish.grizzly.threadpool.SyncThreadPool
aload 1
new java.util.LinkedList
dup
invokespecial java.util.LinkedList.<init>:()V
invokevirtual org.glassfish.grizzly.threadpool.ThreadPoolConfig.setQueue:(Ljava/util/Queue;)Lorg/glassfish/grizzly/threadpool/ThreadPoolConfig;
invokevirtual org.glassfish.grizzly.threadpool.ThreadPoolConfig.getQueue:()Ljava/util/Queue;
7: StackMap locals: org.glassfish.grizzly.threadpool.SyncThreadPool org.glassfish.grizzly.threadpool.ThreadPoolConfig
StackMap stack: org.glassfish.grizzly.threadpool.SyncThreadPool java.util.Queue
putfield org.glassfish.grizzly.threadpool.SyncThreadPool.workQueue:Ljava/util/Queue;
8: aload 0
aload 1
invokevirtual org.glassfish.grizzly.threadpool.ThreadPoolConfig.getQueueLimit:()I
putfield org.glassfish.grizzly.threadpool.SyncThreadPool.maxQueuedTasks:I
9: aload 1
invokevirtual org.glassfish.grizzly.threadpool.ThreadPoolConfig.getCorePoolSize:()I
istore 2
start local 2 10: goto 12
11: StackMap locals: int
StackMap stack:
aload 0
new org.glassfish.grizzly.threadpool.SyncThreadPool$SyncThreadWorker
dup
aload 0
iconst_1
invokespecial org.glassfish.grizzly.threadpool.SyncThreadPool$SyncThreadWorker.<init>:(Lorg/glassfish/grizzly/threadpool/SyncThreadPool;Z)V
invokevirtual org.glassfish.grizzly.threadpool.SyncThreadPool.startWorker:(Lorg/glassfish/grizzly/threadpool/AbstractThreadPool$Worker;)V
12: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.currentPoolSize:I
iload 2
if_icmplt 11
13: aload 0
invokestatic org.glassfish.grizzly.threadpool.ProbeNotifier.notifyThreadPoolStarted:(Lorg/glassfish/grizzly/threadpool/AbstractThreadPool;)V
14: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lorg/glassfish/grizzly/threadpool/SyncThreadPool;
0 15 1 config Lorg/glassfish/grizzly/threadpool/ThreadPoolConfig;
10 15 2 corePoolSize I
MethodParameters:
Name Flags
config
public void execute(java.lang.Runnable);
descriptor: (Ljava/lang/Runnable;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=6, args_size=2
start local 0 start local 1 0: aload 1
ifnonnull 2
1: new java.lang.IllegalArgumentException
dup
ldc "Runnable task is null"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.stateLock:Ljava/lang/Object;
dup
astore 2
monitorenter
3: aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.running:Z
ifne 5
4: new java.util.concurrent.RejectedExecutionException
dup
ldc "ThreadPool is not running"
invokespecial java.util.concurrent.RejectedExecutionException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals: java.lang.Object
StackMap stack:
aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.workQueue:Ljava/util/Queue;
invokeinterface java.util.Queue.size:()I
iconst_1
iadd
istore 3
start local 3 6: aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.maxQueuedTasks:I
iflt 7
iload 3
aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.maxQueuedTasks:I
if_icmpgt 10
7: StackMap locals: int
StackMap stack:
aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.workQueue:Ljava/util/Queue;
aload 1
invokeinterface java.util.Queue.offer:(Ljava/lang/Object;)Z
ifeq 10
8: aload 0
aload 1
invokevirtual org.glassfish.grizzly.threadpool.SyncThreadPool.onTaskQueued:(Ljava/lang/Runnable;)V
9: goto 12
10: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.glassfish.grizzly.threadpool.SyncThreadPool.onTaskQueueOverflow:()V
11: getstatic org.glassfish.grizzly.threadpool.SyncThreadPool.$assertionsDisabled:Z
ifne 12
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
12: StackMap locals:
StackMap stack:
aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.currentPoolSize:I
aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.activeThreadsCount:I
isub
istore 4
start local 4 13: iload 4
iload 3
if_icmplt 17
14: aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.stateLock:Ljava/lang/Object;
invokevirtual java.lang.Object.notify:()V
15: aload 2
monitorexit
16: return
17: StackMap locals: int
StackMap stack:
aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.currentPoolSize:I
aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.config:Lorg/glassfish/grizzly/threadpool/ThreadPoolConfig;
invokevirtual org.glassfish.grizzly.threadpool.ThreadPoolConfig.getMaxPoolSize:()I
if_icmpge 24
18: aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.currentPoolSize:I
aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.config:Lorg/glassfish/grizzly/threadpool/ThreadPoolConfig;
invokevirtual org.glassfish.grizzly.threadpool.ThreadPoolConfig.getCorePoolSize:()I
if_icmpge 19
iconst_1
goto 20
StackMap locals:
StackMap stack:
19: iconst_0
StackMap locals:
StackMap stack: int
20: istore 5
start local 5 21: aload 0
new org.glassfish.grizzly.threadpool.SyncThreadPool$SyncThreadWorker
dup
aload 0
iload 5
invokespecial org.glassfish.grizzly.threadpool.SyncThreadPool$SyncThreadWorker.<init>:(Lorg/glassfish/grizzly/threadpool/SyncThreadPool;Z)V
invokevirtual org.glassfish.grizzly.threadpool.SyncThreadPool.startWorker:(Lorg/glassfish/grizzly/threadpool/AbstractThreadPool$Worker;)V
22: aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.currentPoolSize:I
aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.config:Lorg/glassfish/grizzly/threadpool/ThreadPoolConfig;
invokevirtual org.glassfish.grizzly.threadpool.ThreadPoolConfig.getMaxPoolSize:()I
if_icmpne 24
23: aload 0
invokevirtual org.glassfish.grizzly.threadpool.SyncThreadPool.onMaxNumberOfThreadsReached:()V
end local 5 end local 4 end local 3 24: StackMap locals:
StackMap stack:
aload 2
monitorexit
25: goto 28
StackMap locals:
StackMap stack: java.lang.Throwable
26: aload 2
monitorexit
27: athrow
28: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 29 0 this Lorg/glassfish/grizzly/threadpool/SyncThreadPool;
0 29 1 task Ljava/lang/Runnable;
6 24 3 workQueueSize I
13 24 4 idleThreadsNumber I
21 24 5 isCore Z
Exception table:
from to target type
3 16 26 any
17 25 26 any
26 27 26 any
MethodParameters:
Name Flags
task
protected void startWorker(org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker);
descriptor: (Lorg/glassfish/grizzly/threadpool/AbstractThreadPool$Worker;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.stateLock:Ljava/lang/Object;
dup
astore 2
monitorenter
1: aload 0
aload 1
invokespecial org.glassfish.grizzly.threadpool.AbstractThreadPool.startWorker:(Lorg/glassfish/grizzly/threadpool/AbstractThreadPool$Worker;)V
2: aload 0
dup
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.activeThreadsCount:I
iconst_1
iadd
putfield org.glassfish.grizzly.threadpool.SyncThreadPool.activeThreadsCount:I
3: aload 0
dup
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.currentPoolSize:I
iconst_1
iadd
putfield org.glassfish.grizzly.threadpool.SyncThreadPool.currentPoolSize:I
4: aload 2
monitorexit
5: goto 8
StackMap locals: org.glassfish.grizzly.threadpool.SyncThreadPool org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker java.lang.Object
StackMap stack: java.lang.Throwable
6: aload 2
monitorexit
7: athrow
8: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/glassfish/grizzly/threadpool/SyncThreadPool;
0 9 1 worker Lorg/glassfish/grizzly/threadpool/AbstractThreadPool$Worker;
Exception table:
from to target type
1 5 6 any
6 7 6 any
MethodParameters:
Name Flags
worker
protected void onWorkerExit(org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker);
descriptor: (Lorg/glassfish/grizzly/threadpool/AbstractThreadPool$Worker;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokespecial org.glassfish.grizzly.threadpool.AbstractThreadPool.onWorkerExit:(Lorg/glassfish/grizzly/threadpool/AbstractThreadPool$Worker;)V
1: aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.stateLock:Ljava/lang/Object;
dup
astore 2
monitorenter
2: aload 0
dup
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.currentPoolSize:I
iconst_1
isub
putfield org.glassfish.grizzly.threadpool.SyncThreadPool.currentPoolSize:I
3: aload 0
dup
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.activeThreadsCount:I
iconst_1
isub
putfield org.glassfish.grizzly.threadpool.SyncThreadPool.activeThreadsCount:I
4: aload 2
monitorexit
5: goto 8
StackMap locals: org.glassfish.grizzly.threadpool.SyncThreadPool org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker java.lang.Object
StackMap stack: java.lang.Throwable
6: aload 2
monitorexit
7: athrow
8: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/glassfish/grizzly/threadpool/SyncThreadPool;
0 9 1 worker Lorg/glassfish/grizzly/threadpool/AbstractThreadPool$Worker;
Exception table:
from to target type
2 5 6 any
6 7 6 any
MethodParameters:
Name Flags
worker
protected void poisonAll();
descriptor: ()V
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=3, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.currentPoolSize:I
istore 1
start local 1 1: aload 0
invokevirtual org.glassfish.grizzly.threadpool.SyncThreadPool.getQueue:()Ljava/util/Queue;
astore 2
start local 2 2: goto 4
3: StackMap locals: int java.util.Queue
StackMap stack:
aload 2
getstatic org.glassfish.grizzly.threadpool.SyncThreadPool.poison:Ljava/lang/Runnable;
invokeinterface java.util.Queue.offer:(Ljava/lang/Object;)Z
pop
4: StackMap locals:
StackMap stack:
iload 1
iinc 1 -1
ifgt 3
5: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/glassfish/grizzly/threadpool/SyncThreadPool;
1 6 1 size I
2 6 2 q Ljava/util/Queue<Ljava/lang/Runnable;>;
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.stateLock:Ljava/lang/Object;
dup
astore 1
monitorenter
1: new java.lang.StringBuilder
dup
aload 0
invokespecial org.glassfish.grizzly.threadpool.AbstractThreadPool.toString:()Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
2: ldc ", max-queue-size="
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield org.glassfish.grizzly.threadpool.SyncThreadPool.maxQueuedTasks:I
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
3: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
aload 1
monitorexit
4: areturn
5: StackMap locals: org.glassfish.grizzly.threadpool.SyncThreadPool java.lang.Object
StackMap stack: java.lang.Throwable
aload 1
monitorexit
6: athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/glassfish/grizzly/threadpool/SyncThreadPool;
Exception table:
from to target type
1 4 5 any
5 6 5 any
}
SourceFile: "SyncThreadPool.java"
NestMembers:
org.glassfish.grizzly.threadpool.SyncThreadPool$SyncThreadWorker
InnerClasses:
public abstract Worker = org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker of org.glassfish.grizzly.threadpool.AbstractThreadPool
protected SyncThreadWorker = org.glassfish.grizzly.threadpool.SyncThreadPool$SyncThreadWorker of org.glassfish.grizzly.threadpool.SyncThreadPool