public class io.vertx.core.impl.CloseHooks
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.vertx.core.impl.CloseHooks
super_class: java.lang.Object
{
private final io.vertx.core.impl.logging.Logger log;
descriptor: Lio/vertx/core/impl/logging/Logger;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private boolean closeHooksRun;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private java.util.Map<io.vertx.core.Closeable, io.vertx.core.impl.CloseHooks> closeHooks;
descriptor: Ljava/util/Map;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/Map<Lio/vertx/core/Closeable;Lio/vertx/core/impl/CloseHooks;>;
void <init>(io.vertx.core.impl.logging.Logger);
descriptor: (Lio/vertx/core/impl/logging/Logger;)V
flags: (0x0000)
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
aload 1
putfield io.vertx.core.impl.CloseHooks.log:Lio/vertx/core/impl/logging/Logger;
2: aload 0
new java.util.WeakHashMap
dup
invokespecial java.util.WeakHashMap.<init>:()V
putfield io.vertx.core.impl.CloseHooks.closeHooks:Ljava/util/Map;
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lio/vertx/core/impl/CloseHooks;
0 4 1 log Lio/vertx/core/impl/logging/Logger;
MethodParameters:
Name Flags
log
public synchronized void add(io.vertx.core.Closeable);
descriptor: (Lio/vertx/core/Closeable;)V
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield io.vertx.core.impl.CloseHooks.closeHooks:Ljava/util/Map;
ifnonnull 2
1: new java.lang.IllegalStateException
dup
invokespecial java.lang.IllegalStateException.<init>:()V
athrow
2: StackMap locals:
StackMap stack:
aload 1
instanceof io.vertx.core.impl.CloseFuture
ifeq 5
3: aload 1
checkcast io.vertx.core.impl.CloseFuture
astore 2
start local 2 4: aload 2
aload 0
aload 2
invokedynamic handle(Lio/vertx/core/impl/CloseHooks;Lio/vertx/core/impl/CloseFuture;)Lio/vertx/core/Handler;
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
io/vertx/core/impl/CloseHooks.lambda$0(Lio/vertx/core/impl/CloseFuture;Lio/vertx/core/AsyncResult;)V (7)
(Lio/vertx/core/AsyncResult;)V
invokevirtual io.vertx.core.impl.CloseFuture.onComplete:(Lio/vertx/core/Handler;)Lio/vertx/core/Future;
pop
end local 2 5: StackMap locals:
StackMap stack:
aload 0
getfield io.vertx.core.impl.CloseHooks.closeHooks:Ljava/util/Map;
aload 1
aload 0
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
6: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lio/vertx/core/impl/CloseHooks;
0 7 1 hook Lio/vertx/core/Closeable;
4 5 2 fut Lio/vertx/core/impl/CloseFuture;
MethodParameters:
Name Flags
hook
public synchronized void remove(io.vertx.core.Closeable);
descriptor: (Lio/vertx/core/Closeable;)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 io.vertx.core.impl.CloseHooks.closeHooks:Ljava/util/Map;
ifnull 2
1: aload 0
getfield io.vertx.core.impl.CloseHooks.closeHooks:Ljava/util/Map;
aload 1
invokeinterface java.util.Map.remove:(Ljava/lang/Object;)Ljava/lang/Object;
pop
2: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lio/vertx/core/impl/CloseHooks;
0 3 1 hook Lio/vertx/core/Closeable;
MethodParameters:
Name Flags
hook
void run(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>);
descriptor: (Lio/vertx/core/Handler;)V
flags: (0x0000)
Code:
stack=4, locals=10, args_size=2
start local 0 start local 1 0: aload 0
dup
astore 3
monitorenter
1: aload 0
getfield io.vertx.core.impl.CloseHooks.closeHooksRun:Z
ifeq 3
2: new java.lang.IllegalStateException
dup
ldc "Close hooks already run"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: io.vertx.core.impl.CloseHooks io.vertx.core.Handler top io.vertx.core.impl.CloseHooks
StackMap stack:
aload 0
iconst_1
putfield io.vertx.core.impl.CloseHooks.closeHooksRun:Z
4: aload 0
getfield io.vertx.core.impl.CloseHooks.closeHooks:Ljava/util/Map;
astore 2
start local 2 5: aload 0
aconst_null
putfield io.vertx.core.impl.CloseHooks.closeHooks:Ljava/util/Map;
6: aload 3
monitorexit
7: goto 10
end local 2 StackMap locals:
StackMap stack: java.lang.Throwable
8: aload 3
monitorexit
9: athrow
start local 2 10: StackMap locals: io.vertx.core.impl.CloseHooks io.vertx.core.Handler java.util.Map
StackMap stack:
new java.util.ArrayList
dup
aload 2
invokeinterface java.util.Map.keySet:()Ljava/util/Set;
invokespecial java.util.ArrayList.<init>:(Ljava/util/Collection;)V
astore 3
start local 3 11: aload 3
invokeinterface java.util.List.size:()I
istore 4
start local 4 12: iload 4
ifle 25
13: new java.util.concurrent.atomic.AtomicInteger
dup
invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:()V
astore 5
start local 5 14: aload 3
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 7
goto 23
StackMap locals: io.vertx.core.impl.CloseHooks io.vertx.core.Handler java.util.Map java.util.List int java.util.concurrent.atomic.AtomicInteger top java.util.Iterator
StackMap stack:
15: aload 7
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast io.vertx.core.Closeable
astore 6
start local 6 16: invokestatic io.vertx.core.Promise.promise:()Lio/vertx/core/Promise;
astore 8
start local 8 17: aload 8
invokeinterface io.vertx.core.Promise.future:()Lio/vertx/core/Future;
aload 5
iload 4
aload 1
invokedynamic handle(Ljava/util/concurrent/atomic/AtomicInteger;ILio/vertx/core/Handler;)Lio/vertx/core/Handler;
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
io/vertx/core/impl/CloseHooks.lambda$1(Ljava/util/concurrent/atomic/AtomicInteger;ILio/vertx/core/Handler;Lio/vertx/core/AsyncResult;)V (6)
(Lio/vertx/core/AsyncResult;)V
invokeinterface io.vertx.core.Future.onComplete:(Lio/vertx/core/Handler;)Lio/vertx/core/Future;
pop
18: aload 6
aload 8
invokeinterface io.vertx.core.Closeable.close:(Lio/vertx/core/Promise;)V
19: goto 23
StackMap locals: io.vertx.core.impl.CloseHooks io.vertx.core.Handler java.util.Map java.util.List int java.util.concurrent.atomic.AtomicInteger io.vertx.core.Closeable java.util.Iterator io.vertx.core.Promise
StackMap stack: java.lang.Throwable
20: astore 9
start local 9 21: aload 0
getfield io.vertx.core.impl.CloseHooks.log:Lio/vertx/core/impl/logging/Logger;
ldc "Failed to run close hook"
aload 9
invokeinterface io.vertx.core.impl.logging.Logger.warn:(Ljava/lang/Object;Ljava/lang/Throwable;)V
22: aload 8
aload 9
invokeinterface io.vertx.core.Promise.tryFail:(Ljava/lang/Throwable;)Z
pop
end local 9 end local 8 end local 6 23: StackMap locals: io.vertx.core.impl.CloseHooks io.vertx.core.Handler java.util.Map java.util.List int java.util.concurrent.atomic.AtomicInteger top java.util.Iterator
StackMap stack:
aload 7
invokeinterface java.util.Iterator.hasNext:()Z
ifne 15
end local 5 24: goto 26
25: StackMap locals: io.vertx.core.impl.CloseHooks io.vertx.core.Handler java.util.Map java.util.List int
StackMap stack:
aload 1
invokestatic io.vertx.core.Future.succeededFuture:()Lio/vertx/core/Future;
invokeinterface io.vertx.core.Handler.handle:(Ljava/lang/Object;)V
26: 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 27 0 this Lio/vertx/core/impl/CloseHooks;
0 27 1 completionHandler Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Ljava/lang/Void;>;>;
5 8 2 copy Ljava/util/Map<Lio/vertx/core/Closeable;Lio/vertx/core/impl/CloseHooks;>;
10 27 2 copy Ljava/util/Map<Lio/vertx/core/Closeable;Lio/vertx/core/impl/CloseHooks;>;
11 27 3 list Ljava/util/List<Lio/vertx/core/Closeable;>;
12 27 4 num I
14 24 5 count Ljava/util/concurrent/atomic/AtomicInteger;
16 23 6 hook Lio/vertx/core/Closeable;
17 23 8 promise Lio/vertx/core/Promise<Ljava/lang/Void;>;
21 23 9 t Ljava/lang/Throwable;
Exception table:
from to target type
1 7 8 any
8 9 8 any
18 19 20 Class java.lang.Throwable
Signature: (Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Ljava/lang/Void;>;>;)V
MethodParameters:
Name Flags
completionHandler
private void lambda$0(io.vertx.core.impl.CloseFuture, io.vertx.core.AsyncResult);
descriptor: (Lio/vertx/core/impl/CloseFuture;Lio/vertx/core/AsyncResult;)V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 2 0: aload 0
aload 1
invokevirtual io.vertx.core.impl.CloseHooks.remove:(Lio/vertx/core/Closeable;)V
return
end local 2 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/vertx/core/impl/CloseHooks;
0 1 2 ar Lio/vertx/core/AsyncResult<Ljava/lang/Void;>;
private static void lambda$1(java.util.concurrent.atomic.AtomicInteger, int, io.vertx.core.Handler, io.vertx.core.AsyncResult);
descriptor: (Ljava/util/concurrent/atomic/AtomicInteger;ILio/vertx/core/Handler;Lio/vertx/core/AsyncResult;)V
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=2, locals=4, args_size=4
start local 3 0: aload 0
invokevirtual java.util.concurrent.atomic.AtomicInteger.incrementAndGet:()I
iload 1
if_icmpne 2
1: aload 2
invokestatic io.vertx.core.Future.succeededFuture:()Lio/vertx/core/Future;
invokeinterface io.vertx.core.Handler.handle:(Ljava/lang/Object;)V
2: StackMap locals:
StackMap stack:
return
end local 3 LocalVariableTable:
Start End Slot Name Signature
0 3 3 ar Lio/vertx/core/AsyncResult<Ljava/lang/Void;>;
}
SourceFile: "CloseHooks.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles