public final class okhttp3.ConnectionPool
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: okhttp3.ConnectionPool
super_class: java.lang.Object
{
private static final java.util.concurrent.Executor executor;
descriptor: Ljava/util/concurrent/Executor;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final int maxIdleConnections;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final long keepAliveDurationNs;
descriptor: J
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.Runnable cleanupRunnable;
descriptor: Ljava/lang/Runnable;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.Deque<okhttp3.internal.connection.RealConnection> connections;
descriptor: Ljava/util/Deque;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Deque<Lokhttp3/internal/connection/RealConnection;>;
final okhttp3.internal.connection.RouteDatabase routeDatabase;
descriptor: Lokhttp3/internal/connection/RouteDatabase;
flags: (0x0010) ACC_FINAL
boolean cleanupRunning;
descriptor: Z
flags: (0x0000)
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=10, locals=0, args_size=0
0: ldc Lokhttp3/ConnectionPool;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic okhttp3.ConnectionPool.$assertionsDisabled:Z
3: new java.util.concurrent.ThreadPoolExecutor
dup
iconst_0
4: ldc 2147483647
ldc 60
getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
5: new java.util.concurrent.SynchronousQueue
dup
invokespecial java.util.concurrent.SynchronousQueue.<init>:()V
ldc "OkHttp ConnectionPool"
iconst_1
invokestatic okhttp3.internal.Util.threadFactory:(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;
6: invokespecial java.util.concurrent.ThreadPoolExecutor.<init>:(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V
putstatic okhttp3.ConnectionPool.executor:Ljava/util/concurrent/Executor;
7: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
iconst_5
ldc 5
getstatic java.util.concurrent.TimeUnit.MINUTES:Ljava/util/concurrent/TimeUnit;
invokespecial okhttp3.ConnectionPool.<init>:(IJLjava/util/concurrent/TimeUnit;)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lokhttp3/ConnectionPool;
public void <init>(int, long, java.util.concurrent.TimeUnit);
descriptor: (IJLjava/util/concurrent/TimeUnit;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 4 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new okhttp3.ConnectionPool$1
dup
aload 0
invokespecial okhttp3.ConnectionPool$1.<init>:(Lokhttp3/ConnectionPool;)V
putfield okhttp3.ConnectionPool.cleanupRunnable:Ljava/lang/Runnable;
2: aload 0
new java.util.ArrayDeque
dup
invokespecial java.util.ArrayDeque.<init>:()V
putfield okhttp3.ConnectionPool.connections:Ljava/util/Deque;
3: aload 0
new okhttp3.internal.connection.RouteDatabase
dup
invokespecial okhttp3.internal.connection.RouteDatabase.<init>:()V
putfield okhttp3.ConnectionPool.routeDatabase:Lokhttp3/internal/connection/RouteDatabase;
4: aload 0
iload 1
putfield okhttp3.ConnectionPool.maxIdleConnections:I
5: aload 0
aload 4
lload 2
invokevirtual java.util.concurrent.TimeUnit.toNanos:(J)J
putfield okhttp3.ConnectionPool.keepAliveDurationNs:J
6: lload 2
lconst_0
lcmp
ifgt 8
7: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "keepAliveDuration <= 0: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 2
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
8: StackMap locals: okhttp3.ConnectionPool int long java.util.concurrent.TimeUnit
StackMap stack:
return
end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lokhttp3/ConnectionPool;
0 9 1 maxIdleConnections I
0 9 2 keepAliveDuration J
0 9 4 timeUnit Ljava/util/concurrent/TimeUnit;
MethodParameters:
Name Flags
maxIdleConnections
keepAliveDuration
timeUnit
public synchronized int idleConnectionCount();
descriptor: ()I
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=1, locals=4, args_size=1
start local 0 0: iconst_0
istore 1
start local 1 1: aload 0
getfield okhttp3.ConnectionPool.connections:Ljava/util/Deque;
invokeinterface java.util.Deque.iterator:()Ljava/util/Iterator;
astore 3
goto 4
StackMap locals: okhttp3.ConnectionPool int top java.util.Iterator
StackMap stack:
2: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast okhttp3.internal.connection.RealConnection
astore 2
start local 2 3: aload 2
getfield okhttp3.internal.connection.RealConnection.allocations:Ljava/util/List;
invokeinterface java.util.List.isEmpty:()Z
ifeq 4
iinc 1 1
end local 2 4: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
5: iload 1
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lokhttp3/ConnectionPool;
1 6 1 total I
3 4 2 connection Lokhttp3/internal/connection/RealConnection;
public synchronized int connectionCount();
descriptor: ()I
flags: (0x0021) ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield okhttp3.ConnectionPool.connections:Ljava/util/Deque;
invokeinterface java.util.Deque.size:()I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lokhttp3/ConnectionPool;
okhttp3.internal.connection.RealConnection get(okhttp3.Address, okhttp3.internal.connection.StreamAllocation, okhttp3.Route);
descriptor: (Lokhttp3/Address;Lokhttp3/internal/connection/StreamAllocation;Lokhttp3/Route;)Lokhttp3/internal/connection/RealConnection;
flags: (0x0000)
Code:
stack=3, locals=4, args_size=4
start local 0 0: new java.lang.Error
dup
ldc "Unresolved compilation problem: \n\tNullable cannot be resolved to a type\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lokhttp3/ConnectionPool;
RuntimeInvisibleAnnotations:
Nullable()
RuntimeInvisibleTypeAnnotations:
METHOD_RETURN
Nullable()
MethodParameters:
Name Flags
address
streamAllocation
route
java.net.Socket deduplicate(okhttp3.Address, okhttp3.internal.connection.StreamAllocation);
descriptor: (Lokhttp3/Address;Lokhttp3/internal/connection/StreamAllocation;)Ljava/net/Socket;
flags: (0x0000)
Code:
stack=3, locals=3, args_size=3
start local 0 0: new java.lang.Error
dup
ldc "Unresolved compilation problem: \n\tNullable cannot be resolved to a type\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lokhttp3/ConnectionPool;
RuntimeInvisibleAnnotations:
Nullable()
RuntimeInvisibleTypeAnnotations:
METHOD_RETURN
Nullable()
MethodParameters:
Name Flags
address
streamAllocation
void put(okhttp3.internal.connection.RealConnection);
descriptor: (Lokhttp3/internal/connection/RealConnection;)V
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: getstatic okhttp3.ConnectionPool.$assertionsDisabled:Z
ifne 1
aload 0
invokestatic java.lang.Thread.holdsLock:(Ljava/lang/Object;)Z
ifne 1
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
aload 0
getfield okhttp3.ConnectionPool.cleanupRunning:Z
ifne 4
2: aload 0
iconst_1
putfield okhttp3.ConnectionPool.cleanupRunning:Z
3: getstatic okhttp3.ConnectionPool.executor:Ljava/util/concurrent/Executor;
aload 0
getfield okhttp3.ConnectionPool.cleanupRunnable:Ljava/lang/Runnable;
invokeinterface java.util.concurrent.Executor.execute:(Ljava/lang/Runnable;)V
4: StackMap locals:
StackMap stack:
aload 0
getfield okhttp3.ConnectionPool.connections:Ljava/util/Deque;
aload 1
invokeinterface java.util.Deque.add:(Ljava/lang/Object;)Z
pop
5: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lokhttp3/ConnectionPool;
0 6 1 connection Lokhttp3/internal/connection/RealConnection;
MethodParameters:
Name Flags
connection
boolean connectionBecameIdle(okhttp3.internal.connection.RealConnection);
descriptor: (Lokhttp3/internal/connection/RealConnection;)Z
flags: (0x0000)
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: getstatic okhttp3.ConnectionPool.$assertionsDisabled:Z
ifne 1
aload 0
invokestatic java.lang.Thread.holdsLock:(Ljava/lang/Object;)Z
ifne 1
new java.lang.AssertionError
dup
invokespecial java.lang.AssertionError.<init>:()V
athrow
1: StackMap locals:
StackMap stack:
aload 1
getfield okhttp3.internal.connection.RealConnection.noNewStreams:Z
ifne 2
aload 0
getfield okhttp3.ConnectionPool.maxIdleConnections:I
ifne 4
2: StackMap locals:
StackMap stack:
aload 0
getfield okhttp3.ConnectionPool.connections:Ljava/util/Deque;
aload 1
invokeinterface java.util.Deque.remove:(Ljava/lang/Object;)Z
pop
3: iconst_1
ireturn
4: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.lang.Object.notifyAll:()V
5: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lokhttp3/ConnectionPool;
0 6 1 connection Lokhttp3/internal/connection/RealConnection;
MethodParameters:
Name Flags
connection
public void evictAll();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=5, args_size=1
start local 0 0: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 1
start local 1 1: aload 0
dup
astore 2
monitorenter
2: aload 0
getfield okhttp3.ConnectionPool.connections:Ljava/util/Deque;
invokeinterface java.util.Deque.iterator:()Ljava/util/Iterator;
astore 3
start local 3 3: goto 9
4: StackMap locals: java.util.List okhttp3.ConnectionPool java.util.Iterator
StackMap stack:
aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast okhttp3.internal.connection.RealConnection
astore 4
start local 4 5: aload 4
getfield okhttp3.internal.connection.RealConnection.allocations:Ljava/util/List;
invokeinterface java.util.List.isEmpty:()Z
ifeq 9
6: aload 4
iconst_1
putfield okhttp3.internal.connection.RealConnection.noNewStreams:Z
7: aload 1
aload 4
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
8: aload 3
invokeinterface java.util.Iterator.remove:()V
end local 4 9: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 4
end local 3 10: aload 2
monitorexit
11: goto 14
StackMap locals: okhttp3.ConnectionPool java.util.List okhttp3.ConnectionPool
StackMap stack: java.lang.Throwable
12: aload 2
monitorexit
13: athrow
14: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 3
goto 17
StackMap locals: okhttp3.ConnectionPool java.util.List top java.util.Iterator
StackMap stack:
15: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast okhttp3.internal.connection.RealConnection
astore 2
start local 2 16: aload 2
invokevirtual okhttp3.internal.connection.RealConnection.socket:()Ljava/net/Socket;
invokestatic okhttp3.internal.Util.closeQuietly:(Ljava/net/Socket;)V
end local 2 17: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 15
18: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 this Lokhttp3/ConnectionPool;
1 19 1 evictedConnections Ljava/util/List<Lokhttp3/internal/connection/RealConnection;>;
3 10 3 i Ljava/util/Iterator<Lokhttp3/internal/connection/RealConnection;>;
5 9 4 connection Lokhttp3/internal/connection/RealConnection;
16 17 2 connection Lokhttp3/internal/connection/RealConnection;
Exception table:
from to target type
2 11 12 any
12 13 12 any
long cleanup(long);
descriptor: (J)J
flags: (0x0000)
Code:
stack=4, locals=13, args_size=2
start local 0 start local 1 0: iconst_0
istore 3
start local 3 1: iconst_0
istore 4
start local 4 2: aconst_null
astore 5
start local 5 3: ldc -9223372036854775808
lstore 6
start local 6 4: aload 0
dup
astore 8
monitorenter
5: aload 0
getfield okhttp3.ConnectionPool.connections:Ljava/util/Deque;
invokeinterface java.util.Deque.iterator:()Ljava/util/Iterator;
astore 9
start local 9 6: goto 16
7: StackMap locals: okhttp3.ConnectionPool long int int okhttp3.internal.connection.RealConnection long okhttp3.ConnectionPool java.util.Iterator
StackMap stack:
aload 9
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast okhttp3.internal.connection.RealConnection
astore 10
start local 10 8: aload 0
aload 10
lload 1
invokevirtual okhttp3.ConnectionPool.pruneAndGetAllocationCount:(Lokhttp3/internal/connection/RealConnection;J)I
ifle 11
9: iinc 3 1
10: goto 16
11: StackMap locals: okhttp3.internal.connection.RealConnection
StackMap stack:
iinc 4 1
12: lload 1
aload 10
getfield okhttp3.internal.connection.RealConnection.idleAtNanos:J
lsub
lstore 11
start local 11 13: lload 11
lload 6
lcmp
ifle 16
14: lload 11
lstore 6
15: aload 10
astore 5
end local 11 end local 10 16: StackMap locals:
StackMap stack:
aload 9
invokeinterface java.util.Iterator.hasNext:()Z
ifne 7
end local 9 17: lload 6
aload 0
getfield okhttp3.ConnectionPool.keepAliveDurationNs:J
lcmp
ifge 19
18: iload 4
aload 0
getfield okhttp3.ConnectionPool.maxIdleConnections:I
if_icmple 21
19: StackMap locals:
StackMap stack:
aload 0
getfield okhttp3.ConnectionPool.connections:Ljava/util/Deque;
aload 5
invokeinterface java.util.Deque.remove:(Ljava/lang/Object;)Z
pop
20: goto 30
StackMap locals:
StackMap stack:
21: iload 4
ifle 24
22: aload 0
getfield okhttp3.ConnectionPool.keepAliveDurationNs:J
lload 6
lsub
aload 8
monitorexit
23: lreturn
24: StackMap locals:
StackMap stack:
iload 3
ifle 27
25: aload 0
getfield okhttp3.ConnectionPool.keepAliveDurationNs:J
aload 8
monitorexit
26: lreturn
27: StackMap locals:
StackMap stack:
aload 0
iconst_0
putfield okhttp3.ConnectionPool.cleanupRunning:Z
28: aload 8
monitorexit
29: ldc -1
lreturn
30: StackMap locals:
StackMap stack:
aload 8
monitorexit
31: goto 34
StackMap locals:
StackMap stack: java.lang.Throwable
32: aload 8
monitorexit
33: athrow
34: StackMap locals:
StackMap stack:
aload 5
invokevirtual okhttp3.internal.connection.RealConnection.socket:()Ljava/net/Socket;
invokestatic okhttp3.internal.Util.closeQuietly:(Ljava/net/Socket;)V
35: lconst_0
lreturn
end local 6 end local 5 end local 4 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 36 0 this Lokhttp3/ConnectionPool;
0 36 1 now J
1 36 3 inUseConnectionCount I
2 36 4 idleConnectionCount I
3 36 5 longestIdleConnection Lokhttp3/internal/connection/RealConnection;
4 36 6 longestIdleDurationNs J
6 17 9 i Ljava/util/Iterator<Lokhttp3/internal/connection/RealConnection;>;
8 16 10 connection Lokhttp3/internal/connection/RealConnection;
13 16 11 idleDurationNs J
Exception table:
from to target type
5 23 32 any
24 26 32 any
27 29 32 any
30 31 32 any
32 33 32 any
MethodParameters:
Name Flags
now
private int pruneAndGetAllocationCount(okhttp3.internal.connection.RealConnection, long);
descriptor: (Lokhttp3/internal/connection/RealConnection;J)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=9, args_size=3
start local 0 start local 1 start local 2 0: aload 1
getfield okhttp3.internal.connection.RealConnection.allocations:Ljava/util/List;
astore 4
start local 4 1: iconst_0
istore 5
start local 5 2: goto 18
3: StackMap locals: java.util.List int
StackMap stack:
aload 4
iload 5
invokeinterface java.util.List.get:(I)Ljava/lang/Object;
checkcast java.lang.ref.Reference
astore 6
start local 6 4: aload 6
invokevirtual java.lang.ref.Reference.get:()Ljava/lang/Object;
ifnull 7
5: iinc 5 1
6: goto 18
7: StackMap locals: java.lang.ref.Reference
StackMap stack:
aload 6
checkcast okhttp3.internal.connection.StreamAllocation$StreamAllocationReference
8: astore 7
start local 7 9: new java.lang.StringBuilder
dup
ldc "A connection to "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual okhttp3.internal.connection.RealConnection.route:()Lokhttp3/Route;
invokevirtual okhttp3.Route.address:()Lokhttp3/Address;
invokevirtual okhttp3.Address.url:()Lokhttp3/HttpUrl;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
10: ldc " was leaked. Did you forget to close a response body?"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
11: invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 8
start local 8 12: invokestatic okhttp3.internal.platform.Platform.get:()Lokhttp3/internal/platform/Platform;
aload 8
aload 7
getfield okhttp3.internal.connection.StreamAllocation$StreamAllocationReference.callStackTrace:Ljava/lang/Object;
invokevirtual okhttp3.internal.platform.Platform.logCloseableLeak:(Ljava/lang/String;Ljava/lang/Object;)V
13: aload 4
iload 5
invokeinterface java.util.List.remove:(I)Ljava/lang/Object;
pop
14: aload 1
iconst_1
putfield okhttp3.internal.connection.RealConnection.noNewStreams:Z
15: aload 4
invokeinterface java.util.List.isEmpty:()Z
ifeq 18
16: aload 1
lload 2
aload 0
getfield okhttp3.ConnectionPool.keepAliveDurationNs:J
lsub
putfield okhttp3.internal.connection.RealConnection.idleAtNanos:J
17: iconst_0
ireturn
end local 8 end local 7 end local 6 18: StackMap locals:
StackMap stack:
iload 5
aload 4
invokeinterface java.util.List.size:()I
if_icmplt 3
end local 5 19: aload 4
invokeinterface java.util.List.size:()I
ireturn
end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 20 0 this Lokhttp3/ConnectionPool;
0 20 1 connection Lokhttp3/internal/connection/RealConnection;
0 20 2 now J
1 20 4 references Ljava/util/List<Ljava/lang/ref/Reference<Lokhttp3/internal/connection/StreamAllocation;>;>;
2 19 5 i I
4 18 6 reference Ljava/lang/ref/Reference<Lokhttp3/internal/connection/StreamAllocation;>;
9 18 7 streamAllocRef Lokhttp3/internal/connection/StreamAllocation$StreamAllocationReference;
12 18 8 message Ljava/lang/String;
MethodParameters:
Name Flags
connection
now
}
SourceFile: "ConnectionPool.java"
NestMembers:
okhttp3.ConnectionPool$1
InnerClasses:
okhttp3.ConnectionPool$1
public final StreamAllocationReference = okhttp3.internal.connection.StreamAllocation$StreamAllocationReference of okhttp3.internal.connection.StreamAllocation