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 // io.vertx.core.impl.CloseHooks this
        start local 1 // io.vertx.core.impl.logging.Logger log
         0: .line 36
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 37
            aload 0 /* this */
            aload 1 /* log */
            putfield io.vertx.core.impl.CloseHooks.log:Lio/vertx/core/impl/logging/Logger;
         2: .line 38
            aload 0 /* this */
            new java.util.WeakHashMap
            dup
            invokespecial java.util.WeakHashMap.<init>:()V
            putfield io.vertx.core.impl.CloseHooks.closeHooks:Ljava/util/Map;
         3: .line 39
            return
        end local 1 // io.vertx.core.impl.logging.Logger log
        end local 0 // io.vertx.core.impl.CloseHooks this
      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 // io.vertx.core.impl.CloseHooks this
        start local 1 // io.vertx.core.Closeable hook
         0: .line 47
            aload 0 /* this */
            getfield io.vertx.core.impl.CloseHooks.closeHooks:Ljava/util/Map;
            ifnonnull 2
         1: .line 48
            new java.lang.IllegalStateException
            dup
            invokespecial java.lang.IllegalStateException.<init>:()V
            athrow
         2: .line 50
      StackMap locals:
      StackMap stack:
            aload 1 /* hook */
            instanceof io.vertx.core.impl.CloseFuture
            ifeq 5
         3: .line 51
            aload 1 /* hook */
            checkcast io.vertx.core.impl.CloseFuture
            astore 2 /* fut */
        start local 2 // io.vertx.core.impl.CloseFuture fut
         4: .line 52
            aload 2 /* fut */
            aload 0 /* this */
            aload 2 /* fut */
            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 // io.vertx.core.impl.CloseFuture fut
         5: .line 54
      StackMap locals:
      StackMap stack:
            aload 0 /* this */
            getfield io.vertx.core.impl.CloseHooks.closeHooks:Ljava/util/Map;
            aload 1 /* hook */
            aload 0 /* this */
            invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
            pop
         6: .line 55
            return
        end local 1 // io.vertx.core.Closeable hook
        end local 0 // io.vertx.core.impl.CloseHooks this
      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 // io.vertx.core.impl.CloseHooks this
        start local 1 // io.vertx.core.Closeable hook
         0: .line 63
            aload 0 /* this */
            getfield io.vertx.core.impl.CloseHooks.closeHooks:Ljava/util/Map;
            ifnull 2
         1: .line 64
            aload 0 /* this */
            getfield io.vertx.core.impl.CloseHooks.closeHooks:Ljava/util/Map;
            aload 1 /* hook */
            invokeinterface java.util.Map.remove:(Ljava/lang/Object;)Ljava/lang/Object;
            pop
         2: .line 66
      StackMap locals:
      StackMap stack:
            return
        end local 1 // io.vertx.core.Closeable hook
        end local 0 // io.vertx.core.impl.CloseHooks this
      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 // io.vertx.core.impl.CloseHooks this
        start local 1 // io.vertx.core.Handler completionHandler
         0: .line 75
            aload 0 /* this */
            dup
            astore 3
            monitorenter
         1: .line 76
            aload 0 /* this */
            getfield io.vertx.core.impl.CloseHooks.closeHooksRun:Z
            ifeq 3
         2: .line 78
            new java.lang.IllegalStateException
            dup
            ldc "Close hooks already run"
            invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
            athrow
         3: .line 80
      StackMap locals: io.vertx.core.impl.CloseHooks io.vertx.core.Handler top io.vertx.core.impl.CloseHooks
      StackMap stack:
            aload 0 /* this */
            iconst_1
            putfield io.vertx.core.impl.CloseHooks.closeHooksRun:Z
         4: .line 81
            aload 0 /* this */
            getfield io.vertx.core.impl.CloseHooks.closeHooks:Ljava/util/Map;
            astore 2 /* copy */
        start local 2 // java.util.Map copy
         5: .line 82
            aload 0 /* this */
            aconst_null
            putfield io.vertx.core.impl.CloseHooks.closeHooks:Ljava/util/Map;
         6: .line 75
            aload 3
            monitorexit
         7: goto 10
        end local 2 // java.util.Map copy
      StackMap locals:
      StackMap stack: java.lang.Throwable
         8: aload 3
            monitorexit
         9: athrow
        start local 2 // java.util.Map copy
        10: .line 85
      StackMap locals: io.vertx.core.impl.CloseHooks io.vertx.core.Handler java.util.Map
      StackMap stack:
            new java.util.ArrayList
            dup
            aload 2 /* copy */
            invokeinterface java.util.Map.keySet:()Ljava/util/Set;
            invokespecial java.util.ArrayList.<init>:(Ljava/util/Collection;)V
            astore 3 /* list */
        start local 3 // java.util.List list
        11: .line 86
            aload 3 /* list */
            invokeinterface java.util.List.size:()I
            istore 4 /* num */
        start local 4 // int num
        12: .line 87
            iload 4 /* num */
            ifle 25
        13: .line 88
            new java.util.concurrent.atomic.AtomicInteger
            dup
            invokespecial java.util.concurrent.atomic.AtomicInteger.<init>:()V
            astore 5 /* count */
        start local 5 // java.util.concurrent.atomic.AtomicInteger count
        14: .line 89
            aload 3 /* list */
            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 /* hook */
        start local 6 // io.vertx.core.Closeable hook
        16: .line 90
            invokestatic io.vertx.core.Promise.promise:()Lio/vertx/core/Promise;
            astore 8 /* promise */
        start local 8 // io.vertx.core.Promise promise
        17: .line 91
            aload 8 /* promise */
            invokeinterface io.vertx.core.Promise.future:()Lio/vertx/core/Future;
            aload 5 /* count */
            iload 4 /* num */
            aload 1 /* completionHandler */
            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: .line 97
            aload 6 /* hook */
            aload 8 /* promise */
            invokeinterface io.vertx.core.Closeable.close:(Lio/vertx/core/Promise;)V
        19: .line 98
            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 /* t */
        start local 9 // java.lang.Throwable t
        21: .line 99
            aload 0 /* this */
            getfield io.vertx.core.impl.CloseHooks.log:Lio/vertx/core/impl/logging/Logger;
            ldc "Failed to run close hook"
            aload 9 /* t */
            invokeinterface io.vertx.core.impl.logging.Logger.warn:(Ljava/lang/Object;Ljava/lang/Throwable;)V
        22: .line 100
            aload 8 /* promise */
            aload 9 /* t */
            invokeinterface io.vertx.core.Promise.tryFail:(Ljava/lang/Throwable;)Z
            pop
        end local 9 // java.lang.Throwable t
        end local 8 // io.vertx.core.Promise promise
        end local 6 // io.vertx.core.Closeable hook
        23: .line 89
      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 // java.util.concurrent.atomic.AtomicInteger count
        24: .line 103
            goto 26
        25: .line 104
      StackMap locals: io.vertx.core.impl.CloseHooks io.vertx.core.Handler java.util.Map java.util.List int
      StackMap stack:
            aload 1 /* completionHandler */
            invokestatic io.vertx.core.Future.succeededFuture:()Lio/vertx/core/Future;
            invokeinterface io.vertx.core.Handler.handle:(Ljava/lang/Object;)V
        26: .line 106
      StackMap locals:
      StackMap stack:
            return
        end local 4 // int num
        end local 3 // java.util.List list
        end local 2 // java.util.Map copy
        end local 1 // io.vertx.core.Handler completionHandler
        end local 0 // io.vertx.core.impl.CloseHooks this
      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 // io.vertx.core.impl.CloseHooks this
        start local 2 // io.vertx.core.AsyncResult ar
         0: .line 52
            aload 0 /* this */
            aload 1
            invokevirtual io.vertx.core.impl.CloseHooks.remove:(Lio/vertx/core/Closeable;)V
            return
        end local 2 // io.vertx.core.AsyncResult ar
        end local 0 // io.vertx.core.impl.CloseHooks this
      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 // io.vertx.core.AsyncResult ar
         0: .line 92
            aload 0
            invokevirtual java.util.concurrent.atomic.AtomicInteger.incrementAndGet:()I
            iload 1
            if_icmpne 2
         1: .line 93
            aload 2
            invokestatic io.vertx.core.Future.succeededFuture:()Lio/vertx/core/Future;
            invokeinterface io.vertx.core.Handler.handle:(Ljava/lang/Object;)V
         2: .line 95
      StackMap locals:
      StackMap stack:
            return
        end local 3 // io.vertx.core.AsyncResult ar
      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