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