public class io.reactiverse.pgclient.impl.ConnectionPool
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.reactiverse.pgclient.impl.ConnectionPool
super_class: java.lang.Object
{
private final java.util.function.Consumer<io.vertx.core.Handler<io.vertx.core.AsyncResult<io.reactiverse.pgclient.impl.Connection>>> connector;
descriptor: Ljava/util/function/Consumer;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/function/Consumer<Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Lio/reactiverse/pgclient/impl/Connection;>;>;>;
private final int maxSize;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.ArrayDeque<io.vertx.core.Future<io.reactiverse.pgclient.impl.Connection>> waiters;
descriptor: Ljava/util/ArrayDeque;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/ArrayDeque<Lio/vertx/core/Future<Lio/reactiverse/pgclient/impl/Connection;>;>;
private final java.util.Set<io.reactiverse.pgclient.impl.ConnectionPool$PooledConnection> all;
descriptor: Ljava/util/Set;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Set<Lio/reactiverse/pgclient/impl/ConnectionPool$PooledConnection;>;
private final java.util.ArrayDeque<io.reactiverse.pgclient.impl.ConnectionPool$PooledConnection> available;
descriptor: Ljava/util/ArrayDeque;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/ArrayDeque<Lio/reactiverse/pgclient/impl/ConnectionPool$PooledConnection;>;
private int size;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private final int maxWaitQueueSize;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private boolean checkInProgress;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private boolean closed;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
public void <init>(java.util.function.Consumer<io.vertx.core.Handler<io.vertx.core.AsyncResult<io.reactiverse.pgclient.impl.Connection>>>);
descriptor: (Ljava/util/function/Consumer;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
iconst_4
iconst_m1
invokespecial io.reactiverse.pgclient.impl.ConnectionPool.<init>:(Ljava/util/function/Consumer;II)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/reactiverse/pgclient/impl/ConnectionPool;
0 2 1 connector Ljava/util/function/Consumer<Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Lio/reactiverse/pgclient/impl/Connection;>;>;>;
Signature: (Ljava/util/function/Consumer<Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Lio/reactiverse/pgclient/impl/Connection;>;>;>;)V
MethodParameters:
Name Flags
connector
public void <init>(java.util.function.Consumer<io.vertx.core.Handler<io.vertx.core.AsyncResult<io.reactiverse.pgclient.impl.Connection>>>, );
descriptor: (Ljava/util/function/Consumer;I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
iload 2
iconst_m1
invokespecial io.reactiverse.pgclient.impl.ConnectionPool.<init>:(Ljava/util/function/Consumer;II)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/reactiverse/pgclient/impl/ConnectionPool;
0 2 1 connector Ljava/util/function/Consumer<Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Lio/reactiverse/pgclient/impl/Connection;>;>;>;
0 2 2 maxSize I
Signature: (Ljava/util/function/Consumer<Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Lio/reactiverse/pgclient/impl/Connection;>;>;>;I)V
MethodParameters:
Name Flags
connector
maxSize
public void <init>(java.util.function.Consumer<io.vertx.core.Handler<io.vertx.core.AsyncResult<io.reactiverse.pgclient.impl.Connection>>>, int, );
descriptor: (Ljava/util/function/Consumer;II)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.ArrayDeque
dup
invokespecial java.util.ArrayDeque.<init>:()V
putfield io.reactiverse.pgclient.impl.ConnectionPool.waiters:Ljava/util/ArrayDeque;
2: aload 0
new java.util.HashSet
dup
invokespecial java.util.HashSet.<init>:()V
putfield io.reactiverse.pgclient.impl.ConnectionPool.all:Ljava/util/Set;
3: aload 0
new java.util.ArrayDeque
dup
invokespecial java.util.ArrayDeque.<init>:()V
putfield io.reactiverse.pgclient.impl.ConnectionPool.available:Ljava/util/ArrayDeque;
4: aload 0
iload 2
putfield io.reactiverse.pgclient.impl.ConnectionPool.maxSize:I
5: aload 0
iload 3
putfield io.reactiverse.pgclient.impl.ConnectionPool.maxWaitQueueSize:I
6: aload 0
aload 1
putfield io.reactiverse.pgclient.impl.ConnectionPool.connector:Ljava/util/function/Consumer;
7: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lio/reactiverse/pgclient/impl/ConnectionPool;
0 8 1 connector Ljava/util/function/Consumer<Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Lio/reactiverse/pgclient/impl/Connection;>;>;>;
0 8 2 maxSize I
0 8 3 maxWaitQueueSize I
Signature: (Ljava/util/function/Consumer<Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Lio/reactiverse/pgclient/impl/Connection;>;>;>;II)V
MethodParameters:
Name Flags
connector
maxSize
maxWaitQueueSize
public int available();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.available:Ljava/util/ArrayDeque;
invokevirtual java.util.ArrayDeque.size:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/reactiverse/pgclient/impl/ConnectionPool;
public int size();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.size:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/reactiverse/pgclient/impl/ConnectionPool;
public void acquire(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.reactiverse.pgclient.impl.Connection>>);
descriptor: (Lio/vertx/core/Handler;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.closed:Z
ifeq 2
1: new java.lang.IllegalStateException
dup
ldc "Connection pool closed"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.waiters:Ljava/util/ArrayDeque;
invokestatic io.vertx.core.Future.future:()Lio/vertx/core/Future;
aload 1
invokeinterface io.vertx.core.Future.setHandler:(Lio/vertx/core/Handler;)Lio/vertx/core/Future;
invokevirtual java.util.ArrayDeque.add:(Ljava/lang/Object;)Z
pop
3: aload 0
invokevirtual io.reactiverse.pgclient.impl.ConnectionPool.check:()V
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lio/reactiverse/pgclient/impl/ConnectionPool;
0 5 1 holder Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Lio/reactiverse/pgclient/impl/Connection;>;>;
Signature: (Lio/vertx/core/Handler<Lio/vertx/core/AsyncResult<Lio/reactiverse/pgclient/impl/Connection;>;>;)V
MethodParameters:
Name Flags
holder
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=1
start local 0 0: aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.closed:Z
ifeq 2
1: new java.lang.IllegalStateException
dup
ldc "Connection pool already closed"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
iconst_1
putfield io.reactiverse.pgclient.impl.ConnectionPool.closed:Z
3: new java.util.ArrayList
dup
aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.all:Ljava/util/Set;
invokespecial java.util.ArrayList.<init>:(Ljava/util/Collection;)V
invokevirtual java.util.ArrayList.iterator:()Ljava/util/Iterator;
astore 2
goto 6
StackMap locals: io.reactiverse.pgclient.impl.ConnectionPool top java.util.Iterator
StackMap stack:
4: aload 2
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast io.reactiverse.pgclient.impl.ConnectionPool$PooledConnection
astore 1
start local 1 5: aload 1
invokevirtual io.reactiverse.pgclient.impl.ConnectionPool$PooledConnection.close:()V
end local 1 6: StackMap locals:
StackMap stack:
aload 2
invokeinterface java.util.Iterator.hasNext:()Z
ifne 4
7: ldc "Connection pool close"
invokestatic io.vertx.core.Future.failedFuture:(Ljava/lang/String;)Lio/vertx/core/Future;
astore 1
start local 1 8: aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.waiters:Ljava/util/ArrayDeque;
invokevirtual java.util.ArrayDeque.iterator:()Ljava/util/Iterator;
astore 3
goto 13
StackMap locals: io.reactiverse.pgclient.impl.ConnectionPool io.vertx.core.Future top java.util.Iterator
StackMap stack:
9: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast io.vertx.core.Future
astore 2
start local 2 10: aload 2
aload 1
invokeinterface io.vertx.core.Future.handle:(Lio/vertx/core/AsyncResult;)V
11: goto 13
StackMap locals: io.reactiverse.pgclient.impl.ConnectionPool io.vertx.core.Future io.vertx.core.Future java.util.Iterator
StackMap stack: java.lang.Exception
12: pop
end local 2 13: StackMap locals: io.reactiverse.pgclient.impl.ConnectionPool io.vertx.core.Future top java.util.Iterator
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 9
14: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lio/reactiverse/pgclient/impl/ConnectionPool;
5 6 1 pooled Lio/reactiverse/pgclient/impl/ConnectionPool$PooledConnection;
8 15 1 failure Lio/vertx/core/Future<Lio/reactiverse/pgclient/impl/Connection;>;
10 13 2 pending Lio/vertx/core/Future<Lio/reactiverse/pgclient/impl/Connection;>;
Exception table:
from to target type
10 11 12 Class java.lang.Exception
private void release(io.reactiverse.pgclient.impl.ConnectionPool$PooledConnection);
descriptor: (Lio/reactiverse/pgclient/impl/ConnectionPool$PooledConnection;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.all:Ljava/util/Set;
aload 1
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifeq 3
1: aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.available:Ljava/util/ArrayDeque;
aload 1
invokevirtual java.util.ArrayDeque.add:(Ljava/lang/Object;)Z
pop
2: aload 0
invokevirtual io.reactiverse.pgclient.impl.ConnectionPool.check:()V
3: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lio/reactiverse/pgclient/impl/ConnectionPool;
0 4 1 proxy Lio/reactiverse/pgclient/impl/ConnectionPool$PooledConnection;
MethodParameters:
Name Flags
proxy
private void check();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=5, args_size=1
start local 0 0: aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.closed:Z
ifeq 2
1: return
2: StackMap locals:
StackMap stack:
aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.checkInProgress:Z
ifne 29
3: aload 0
iconst_1
putfield io.reactiverse.pgclient.impl.ConnectionPool.checkInProgress:Z
4: goto 23
5: StackMap locals:
StackMap stack:
aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.available:Ljava/util/ArrayDeque;
invokevirtual java.util.ArrayDeque.size:()I
ifle 10
6: aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.available:Ljava/util/ArrayDeque;
invokevirtual java.util.ArrayDeque.poll:()Ljava/lang/Object;
checkcast io.reactiverse.pgclient.impl.ConnectionPool$PooledConnection
astore 1
start local 1 7: aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.waiters:Ljava/util/ArrayDeque;
invokevirtual java.util.ArrayDeque.poll:()Ljava/lang/Object;
checkcast io.vertx.core.Future
astore 2
start local 2 8: aload 2
aload 1
invokeinterface io.vertx.core.Future.complete:(Ljava/lang/Object;)V
end local 2 end local 1 9: goto 23
10: StackMap locals:
StackMap stack:
aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.size:I
aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.maxSize:I
if_icmpge 15
11: aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.waiters:Ljava/util/ArrayDeque;
invokevirtual java.util.ArrayDeque.poll:()Ljava/lang/Object;
checkcast io.vertx.core.Future
astore 1
start local 1 12: aload 0
dup
getfield io.reactiverse.pgclient.impl.ConnectionPool.size:I
iconst_1
iadd
putfield io.reactiverse.pgclient.impl.ConnectionPool.size:I
13: aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.connector:Ljava/util/function/Consumer;
aload 0
aload 1
invokedynamic handle(Lio/reactiverse/pgclient/impl/ConnectionPool;Lio/vertx/core/Future;)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/reactiverse/pgclient/impl/ConnectionPool.lambda$0(Lio/vertx/core/Future;Lio/vertx/core/AsyncResult;)V (7)
(Lio/vertx/core/AsyncResult;)V
invokeinterface java.util.function.Consumer.accept:(Ljava/lang/Object;)V
end local 1 14: goto 23
15: StackMap locals:
StackMap stack:
aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.maxWaitQueueSize:I
iflt 28
16: aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.size:I
aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.all:Ljava/util/Set;
invokeinterface java.util.Set.size:()I
isub
istore 1
start local 1 17: aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.waiters:Ljava/util/ArrayDeque;
invokevirtual java.util.ArrayDeque.size:()I
aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.maxWaitQueueSize:I
iload 1
iadd
isub
istore 2
start local 2 18: goto 21
19: StackMap locals: int int
StackMap stack:
aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.waiters:Ljava/util/ArrayDeque;
invokevirtual java.util.ArrayDeque.pollLast:()Ljava/lang/Object;
checkcast io.vertx.core.Future
astore 3
start local 3 20: aload 3
new io.vertx.core.impl.NoStackTraceThrowable
dup
ldc "Max waiter size reached"
invokespecial io.vertx.core.impl.NoStackTraceThrowable.<init>:(Ljava/lang/String;)V
invokeinterface io.vertx.core.Future.fail:(Ljava/lang/Throwable;)V
end local 3 21: StackMap locals:
StackMap stack:
iload 2
iinc 2 -1
ifgt 19
end local 2 end local 1 22: goto 28
23: StackMap locals:
StackMap stack:
aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.waiters:Ljava/util/ArrayDeque;
invokevirtual java.util.ArrayDeque.size:()I
ifgt 5
24: goto 28
StackMap locals:
StackMap stack: java.lang.Throwable
25: astore 4
26: aload 0
iconst_0
putfield io.reactiverse.pgclient.impl.ConnectionPool.checkInProgress:Z
27: aload 4
athrow
28: StackMap locals:
StackMap stack:
aload 0
iconst_0
putfield io.reactiverse.pgclient.impl.ConnectionPool.checkInProgress:Z
29: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 30 0 this Lio/reactiverse/pgclient/impl/ConnectionPool;
7 9 1 proxy Lio/reactiverse/pgclient/impl/ConnectionPool$PooledConnection;
8 9 2 waiter Lio/vertx/core/Future<Lio/reactiverse/pgclient/impl/Connection;>;
12 14 1 waiter Lio/vertx/core/Future<Lio/reactiverse/pgclient/impl/Connection;>;
17 22 1 numInProgress I
18 22 2 numToFail I
20 21 3 waiter Lio/vertx/core/Future<Lio/reactiverse/pgclient/impl/Connection;>;
Exception table:
from to target type
4 25 25 any
private void lambda$0(io.vertx.core.Future, io.vertx.core.AsyncResult);
descriptor: (Lio/vertx/core/Future;Lio/vertx/core/AsyncResult;)V
flags: (0x1002) ACC_PRIVATE, ACC_SYNTHETIC
Code:
stack=4, locals=5, args_size=3
start local 0 start local 2 0: aload 2
invokeinterface io.vertx.core.AsyncResult.succeeded:()Z
ifeq 7
1: aload 2
invokeinterface io.vertx.core.AsyncResult.result:()Ljava/lang/Object;
checkcast io.reactiverse.pgclient.impl.Connection
astore 3
start local 3 2: new io.reactiverse.pgclient.impl.ConnectionPool$PooledConnection
dup
aload 0
aload 3
invokespecial io.reactiverse.pgclient.impl.ConnectionPool$PooledConnection.<init>:(Lio/reactiverse/pgclient/impl/ConnectionPool;Lio/reactiverse/pgclient/impl/Connection;)V
astore 4
start local 4 3: aload 0
getfield io.reactiverse.pgclient.impl.ConnectionPool.all:Ljava/util/Set;
aload 4
invokeinterface java.util.Set.add:(Ljava/lang/Object;)Z
pop
4: aload 3
aload 4
invokeinterface io.reactiverse.pgclient.impl.Connection.init:(Lio/reactiverse/pgclient/impl/Connection$Holder;)V
5: aload 1
aload 4
invokeinterface io.vertx.core.Future.complete:(Ljava/lang/Object;)V
end local 4 end local 3 6: goto 10
7: StackMap locals:
StackMap stack:
aload 0
dup
getfield io.reactiverse.pgclient.impl.ConnectionPool.size:I
iconst_1
isub
putfield io.reactiverse.pgclient.impl.ConnectionPool.size:I
8: aload 1
aload 2
invokeinterface io.vertx.core.AsyncResult.cause:()Ljava/lang/Throwable;
invokeinterface io.vertx.core.Future.fail:(Ljava/lang/Throwable;)V
9: aload 0
invokevirtual io.reactiverse.pgclient.impl.ConnectionPool.check:()V
10: StackMap locals:
StackMap stack:
return
end local 2 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lio/reactiverse/pgclient/impl/ConnectionPool;
0 11 2 ar Lio/vertx/core/AsyncResult<Lio/reactiverse/pgclient/impl/Connection;>;
2 6 3 conn Lio/reactiverse/pgclient/impl/Connection;
3 6 4 proxy Lio/reactiverse/pgclient/impl/ConnectionPool$PooledConnection;
}
SourceFile: "ConnectionPool.java"
NestMembers:
io.reactiverse.pgclient.impl.ConnectionPool$PooledConnection
InnerClasses:
public abstract Holder = io.reactiverse.pgclient.impl.Connection$Holder of io.reactiverse.pgclient.impl.Connection
private PooledConnection = io.reactiverse.pgclient.impl.ConnectionPool$PooledConnection of io.reactiverse.pgclient.impl.ConnectionPool
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles