public class org.eclipse.jetty.util.thread.ThreadPoolBudget
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.eclipse.jetty.util.thread.ThreadPoolBudget
super_class: java.lang.Object
{
static final org.slf4j.Logger LOG;
descriptor: Lorg/slf4j/Logger;
flags: (0x0018) ACC_STATIC, ACC_FINAL
private static final org.eclipse.jetty.util.thread.ThreadPoolBudget$Lease NOOP_LEASE;
descriptor: Lorg/eclipse/jetty/util/thread/ThreadPoolBudget$Lease;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.util.Set<org.eclipse.jetty.util.thread.ThreadPoolBudget$Leased> leases;
descriptor: Ljava/util/Set;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Set<Lorg/eclipse/jetty/util/thread/ThreadPoolBudget$Leased;>;
private final java.util.concurrent.atomic.AtomicBoolean warned;
descriptor: Ljava/util/concurrent/atomic/AtomicBoolean;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.eclipse.jetty.util.thread.ThreadPool$SizedThreadPool pool;
descriptor: Lorg/eclipse/jetty/util/thread/ThreadPool$SizedThreadPool;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int warnAt;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: ldc Lorg/eclipse/jetty/util/thread/ThreadPoolBudget;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic org.eclipse.jetty.util.thread.ThreadPoolBudget.LOG:Lorg/slf4j/Logger;
1: new org.eclipse.jetty.util.thread.ThreadPoolBudget$1
dup
invokespecial org.eclipse.jetty.util.thread.ThreadPoolBudget$1.<init>:()V
putstatic org.eclipse.jetty.util.thread.ThreadPoolBudget.NOOP_LEASE:Lorg/eclipse/jetty/util/thread/ThreadPoolBudget$Lease;
2: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(org.eclipse.jetty.util.thread.ThreadPool$SizedThreadPool);
descriptor: (Lorg/eclipse/jetty/util/thread/ThreadPool$SizedThreadPool;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.concurrent.CopyOnWriteArraySet
dup
invokespecial java.util.concurrent.CopyOnWriteArraySet.<init>:()V
putfield org.eclipse.jetty.util.thread.ThreadPoolBudget.leases:Ljava/util/Set;
2: aload 0
new java.util.concurrent.atomic.AtomicBoolean
dup
invokespecial java.util.concurrent.atomic.AtomicBoolean.<init>:()V
putfield org.eclipse.jetty.util.thread.ThreadPoolBudget.warned:Ljava/util/concurrent/atomic/AtomicBoolean;
3: aload 0
aload 1
putfield org.eclipse.jetty.util.thread.ThreadPoolBudget.pool:Lorg/eclipse/jetty/util/thread/ThreadPool$SizedThreadPool;
4: aload 0
iconst_m1
putfield org.eclipse.jetty.util.thread.ThreadPoolBudget.warnAt:I
5: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/eclipse/jetty/util/thread/ThreadPoolBudget;
0 6 1 pool Lorg/eclipse/jetty/util/thread/ThreadPool$SizedThreadPool;
MethodParameters:
Name Flags
pool
public org.eclipse.jetty.util.thread.ThreadPool$SizedThreadPool getSizedThreadPool();
descriptor: ()Lorg/eclipse/jetty/util/thread/ThreadPool$SizedThreadPool;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.eclipse.jetty.util.thread.ThreadPoolBudget.pool:Lorg/eclipse/jetty/util/thread/ThreadPool$SizedThreadPool;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/eclipse/jetty/util/thread/ThreadPoolBudget;
public void reset();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.eclipse.jetty.util.thread.ThreadPoolBudget.leases:Ljava/util/Set;
invokeinterface java.util.Set.clear:()V
1: aload 0
getfield org.eclipse.jetty.util.thread.ThreadPoolBudget.warned:Ljava/util/concurrent/atomic/AtomicBoolean;
iconst_0
invokevirtual java.util.concurrent.atomic.AtomicBoolean.set:(Z)V
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/eclipse/jetty/util/thread/ThreadPoolBudget;
public org.eclipse.jetty.util.thread.ThreadPoolBudget$Lease leaseTo(java.lang.Object, int);
descriptor: (Ljava/lang/Object;I)Lorg/eclipse/jetty/util/thread/ThreadPoolBudget$Lease;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=5, args_size=3
start local 0 start local 1 start local 2 0: new org.eclipse.jetty.util.thread.ThreadPoolBudget$Leased
dup
aload 0
aload 1
iload 2
invokespecial org.eclipse.jetty.util.thread.ThreadPoolBudget$Leased.<init>:(Lorg/eclipse/jetty/util/thread/ThreadPoolBudget;Ljava/lang/Object;I)V
astore 3
start local 3 1: aload 0
getfield org.eclipse.jetty.util.thread.ThreadPoolBudget.leases:Ljava/util/Set;
aload 3
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
2: aload 0
aload 0
getfield org.eclipse.jetty.util.thread.ThreadPoolBudget.pool:Lorg/eclipse/jetty/util/thread/ThreadPool$SizedThreadPool;
invokeinterface org.eclipse.jetty.util.thread.ThreadPool$SizedThreadPool.getMaxThreads:()I
invokevirtual org.eclipse.jetty.util.thread.ThreadPoolBudget.check:(I)Z
pop
3: aload 3
4: areturn
5: StackMap locals: org.eclipse.jetty.util.thread.ThreadPoolBudget java.lang.Object int org.eclipse.jetty.util.thread.ThreadPoolBudget$Leased
StackMap stack: java.lang.IllegalStateException
astore 4
start local 4 6: aload 3
invokevirtual org.eclipse.jetty.util.thread.ThreadPoolBudget$Leased.close:()V
7: aload 4
athrow
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/eclipse/jetty/util/thread/ThreadPoolBudget;
0 8 1 leasee Ljava/lang/Object;
0 8 2 threads I
1 8 3 lease Lorg/eclipse/jetty/util/thread/ThreadPoolBudget$Leased;
6 8 4 e Ljava/lang/IllegalStateException;
Exception table:
from to target type
2 4 5 Class java.lang.IllegalStateException
MethodParameters:
Name Flags
leasee
threads
public boolean check(int);
descriptor: (I)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield org.eclipse.jetty.util.thread.ThreadPoolBudget.leases:Ljava/util/Set;
invokeinterface java.util.Set.stream:()Ljava/util/stream/Stream;
1: invokedynamic applyAsInt()Ljava/util/function/ToIntFunction;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)I
org/eclipse/jetty/util/thread/ThreadPoolBudget$Lease.getThreads()I (9 itf)
(Lorg/eclipse/jetty/util/thread/ThreadPoolBudget$Leased;)I
invokeinterface java.util.stream.Stream.mapToInt:(Ljava/util/function/ToIntFunction;)Ljava/util/stream/IntStream;
2: invokeinterface java.util.stream.IntStream.sum:()I
3: istore 2
start local 2 4: iload 1
iload 2
isub
istore 3
start local 3 5: iload 3
ifgt 8
6: aload 0
invokevirtual org.eclipse.jetty.util.thread.ThreadPoolBudget.printInfoOnLeases:()V
7: new java.lang.IllegalStateException
dup
ldc "Insufficient configured threads: required=%d < max=%d for %s"
iconst_3
anewarray java.lang.Object
dup
iconst_0
iload 2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_1
iload 1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_2
aload 0
getfield org.eclipse.jetty.util.thread.ThreadPoolBudget.pool:Lorg/eclipse/jetty/util/thread/ThreadPool$SizedThreadPool;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals: int int
StackMap stack:
iload 3
aload 0
getfield org.eclipse.jetty.util.thread.ThreadPoolBudget.warnAt:I
if_icmpge 13
9: aload 0
getfield org.eclipse.jetty.util.thread.ThreadPoolBudget.warned:Ljava/util/concurrent/atomic/AtomicBoolean;
iconst_0
iconst_1
invokevirtual java.util.concurrent.atomic.AtomicBoolean.compareAndSet:(ZZ)Z
ifeq 12
10: aload 0
invokevirtual org.eclipse.jetty.util.thread.ThreadPoolBudget.printInfoOnLeases:()V
11: getstatic org.eclipse.jetty.util.thread.ThreadPoolBudget.LOG:Lorg/slf4j/Logger;
ldc "Low configured threads: (max={} - required={})={} < warnAt={} for {}"
iconst_5
anewarray java.lang.Object
dup
iconst_0
iload 1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_1
iload 2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_2
iload 3
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_3
aload 0
getfield org.eclipse.jetty.util.thread.ThreadPoolBudget.warnAt:I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_4
aload 0
getfield org.eclipse.jetty.util.thread.ThreadPoolBudget.pool:Lorg/eclipse/jetty/util/thread/ThreadPool$SizedThreadPool;
aastore
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;[Ljava/lang/Object;)V
12: StackMap locals:
StackMap stack:
iconst_0
ireturn
13: StackMap locals:
StackMap stack:
iconst_1
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/eclipse/jetty/util/thread/ThreadPoolBudget;
0 14 1 maxThreads I
4 14 2 required I
5 14 3 left I
Exceptions:
throws java.lang.IllegalStateException
MethodParameters:
Name Flags
maxThreads
private void printInfoOnLeases();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.eclipse.jetty.util.thread.ThreadPoolBudget.leases:Ljava/util/Set;
aload 0
invokedynamic accept(Lorg/eclipse/jetty/util/thread/ThreadPoolBudget;)Ljava/util/function/Consumer;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)V
org/eclipse/jetty/util/thread/ThreadPoolBudget.lambda$1(Lorg/eclipse/jetty/util/thread/ThreadPoolBudget$Leased;)V (7)
(Lorg/eclipse/jetty/util/thread/ThreadPoolBudget$Leased;)V
invokeinterface java.util.Set.forEach:(Ljava/util/function/Consumer;)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/eclipse/jetty/util/thread/ThreadPoolBudget;
public static org.eclipse.jetty.util.thread.ThreadPoolBudget$Lease leaseFrom(java.util.concurrent.Executor, java.lang.Object, int);
descriptor: (Ljava/util/concurrent/Executor;Ljava/lang/Object;I)Lorg/eclipse/jetty/util/thread/ThreadPoolBudget$Lease;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
instanceof org.eclipse.jetty.util.thread.ThreadPool$SizedThreadPool
ifeq 4
1: aload 0
checkcast org.eclipse.jetty.util.thread.ThreadPool$SizedThreadPool
invokeinterface org.eclipse.jetty.util.thread.ThreadPool$SizedThreadPool.getThreadPoolBudget:()Lorg/eclipse/jetty/util/thread/ThreadPoolBudget;
astore 3
start local 3 2: aload 3
ifnull 4
3: aload 3
aload 1
iload 2
invokevirtual org.eclipse.jetty.util.thread.ThreadPoolBudget.leaseTo:(Ljava/lang/Object;I)Lorg/eclipse/jetty/util/thread/ThreadPoolBudget$Lease;
areturn
end local 3 4: StackMap locals:
StackMap stack:
getstatic org.eclipse.jetty.util.thread.ThreadPoolBudget.NOOP_LEASE:Lorg/eclipse/jetty/util/thread/ThreadPoolBudget$Lease;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 executor Ljava/util/concurrent/Executor;
0 5 1 leasee Ljava/lang/Object;
0 5 2 threads I
2 4 3 budget Lorg/eclipse/jetty/util/thread/ThreadPoolBudget;
MethodParameters:
Name Flags
executor
leasee
threads
private void lambda$1(org.eclipse.jetty.util.thread.ThreadPoolBudget$Leased);
descriptor: (Lorg/eclipse/jetty/util/thread/ThreadPoolBudget$Leased;)V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: getstatic org.eclipse.jetty.util.thread.ThreadPoolBudget.LOG:Lorg/slf4j/Logger;
ldc "{} requires {} threads from {}"
iconst_3
anewarray java.lang.Object
dup
iconst_0
aload 1
getfield org.eclipse.jetty.util.thread.ThreadPoolBudget$Leased.leasee:Ljava/lang/Object;
aastore
dup
iconst_1
aload 1
invokevirtual org.eclipse.jetty.util.thread.ThreadPoolBudget$Leased.getThreads:()I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_2
aload 0
getfield org.eclipse.jetty.util.thread.ThreadPoolBudget.pool:Lorg/eclipse/jetty/util/thread/ThreadPool$SizedThreadPool;
aastore
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;[Ljava/lang/Object;)V
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/eclipse/jetty/util/thread/ThreadPoolBudget;
0 1 1 lease Lorg/eclipse/jetty/util/thread/ThreadPoolBudget$Leased;
}
SourceFile: "ThreadPoolBudget.java"
NestMembers:
org.eclipse.jetty.util.thread.ThreadPoolBudget$1 org.eclipse.jetty.util.thread.ThreadPoolBudget$Lease org.eclipse.jetty.util.thread.ThreadPoolBudget$Leased
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
public abstract SizedThreadPool = org.eclipse.jetty.util.thread.ThreadPool$SizedThreadPool of org.eclipse.jetty.util.thread.ThreadPool
org.eclipse.jetty.util.thread.ThreadPoolBudget$1
public abstract Lease = org.eclipse.jetty.util.thread.ThreadPoolBudget$Lease of org.eclipse.jetty.util.thread.ThreadPoolBudget
public Leased = org.eclipse.jetty.util.thread.ThreadPoolBudget$Leased of org.eclipse.jetty.util.thread.ThreadPoolBudget