.class public final Lokhttp3/j; .super Ljava/lang/Object; .source "ConnectionPool.java" # static fields .field static final synthetic $assertionsDisabled:Z .field static final executor:Ljava/util/concurrent/Executor; # instance fields .field final blA:Ljava/util/Deque; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/Deque<", "Lokhttp3/internal/b/c;", ">;" } .end annotation .end field .field final blB:Lokhttp3/internal/b/d; .field blC:Z .field final blx:I .field private final bly:J .field final blz:Ljava/lang/Runnable; # direct methods .method static constructor ()V .locals 9 new-instance v8, Ljava/util/concurrent/ThreadPoolExecutor; const/4 v1, 0x0 const v2, 0x7fffffff const-wide/16 v3, 0x3c sget-object v5, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit; new-instance v6, Ljava/util/concurrent/SynchronousQueue; invoke-direct {v6}, Ljava/util/concurrent/SynchronousQueue;->()V const-string v0, "OkHttp ConnectionPool" const/4 v7, 0x1 invoke-static {v0, v7}, Lokhttp3/internal/c;->h(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory; move-result-object v7 move-object v0, v8 invoke-direct/range {v0 .. v7}, Ljava/util/concurrent/ThreadPoolExecutor;->(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V sput-object v8, Lokhttp3/j;->executor:Ljava/util/concurrent/Executor; return-void .end method .method public constructor ()V .locals 1 sget-object v0, Ljava/util/concurrent/TimeUnit;->MINUTES:Ljava/util/concurrent/TimeUnit; invoke-direct {p0, v0}, Lokhttp3/j;->(Ljava/util/concurrent/TimeUnit;)V return-void .end method .method private constructor (Ljava/util/concurrent/TimeUnit;)V .locals 2 invoke-direct {p0}, Ljava/lang/Object;->()V new-instance v0, Lokhttp3/-$$Lambda$j$UN83HUNjRpluatXsySxi5LPD3pg; invoke-direct {v0, p0}, Lokhttp3/-$$Lambda$j$UN83HUNjRpluatXsySxi5LPD3pg;->(Lokhttp3/j;)V iput-object v0, p0, Lokhttp3/j;->blz:Ljava/lang/Runnable; new-instance v0, Ljava/util/ArrayDeque; invoke-direct {v0}, Ljava/util/ArrayDeque;->()V iput-object v0, p0, Lokhttp3/j;->blA:Ljava/util/Deque; new-instance v0, Lokhttp3/internal/b/d; invoke-direct {v0}, Lokhttp3/internal/b/d;->()V iput-object v0, p0, Lokhttp3/j;->blB:Lokhttp3/internal/b/d; const/4 v0, 0x5 iput v0, p0, Lokhttp3/j;->blx:I const-wide/16 v0, 0x5 invoke-virtual {p1, v0, v1}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J move-result-wide v0 iput-wide v0, p0, Lokhttp3/j;->bly:J return-void .end method .method private aj(J)J .locals 13 monitor-enter p0 :try_start_0 iget-object v0, p0, Lokhttp3/j;->blA:Ljava/util/Deque; invoke-interface {v0}, Ljava/util/Deque;->iterator()Ljava/util/Iterator; move-result-object v0 const/4 v1, 0x0 const/4 v2, 0x0 const-wide/high16 v3, -0x8000000000000000L move-object v5, v2 const/4 v2, 0x0 const/4 v6, 0x0 :cond_0 :goto_0 invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z move-result v7 if-eqz v7, :cond_5 invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v7 check-cast v7, Lokhttp3/internal/b/c; iget-object v8, v7, Lokhttp3/internal/b/c;->bpm:Ljava/util/List; const/4 v9, 0x0 :cond_1 :goto_1 invoke-interface {v8}, Ljava/util/List;->size()I move-result v10 if-ge v9, v10, :cond_3 invoke-interface {v8, v9}, Ljava/util/List;->get(I)Ljava/lang/Object; move-result-object v10 check-cast v10, Ljava/lang/ref/Reference; invoke-virtual {v10}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object; move-result-object v11 if-eqz v11, :cond_2 add-int/lit8 v9, v9, 0x1 goto :goto_1 :cond_2 check-cast v10, Lokhttp3/internal/b/g$a; new-instance v11, Ljava/lang/StringBuilder; const-string v12, "A connection to " invoke-direct {v11, v12}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V iget-object v12, v7, Lokhttp3/internal/b/c;->bpe:Lokhttp3/y; iget-object v12, v12, Lokhttp3/y;->bob:Lokhttp3/a; iget-object v12, v12, Lokhttp3/a;->biB:Lokhttp3/s; invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; const-string v12, " was leaked. Did you forget to close a response body?" invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v11 invoke-static {}, Lokhttp3/internal/h/e;->BV()Lokhttp3/internal/h/e; move-result-object v12 iget-object v10, v10, Lokhttp3/internal/b/g$a;->bpz:Ljava/lang/Object; invoke-virtual {v12, v11, v10}, Lokhttp3/internal/h/e;->s(Ljava/lang/String;Ljava/lang/Object;)V invoke-interface {v8, v9}, Ljava/util/List;->remove(I)Ljava/lang/Object; const/4 v10, 0x1 iput-boolean v10, v7, Lokhttp3/internal/b/c;->bpj:Z invoke-interface {v8}, Ljava/util/List;->isEmpty()Z move-result v10 if-eqz v10, :cond_1 iget-wide v8, p0, Lokhttp3/j;->bly:J sub-long v8, p1, v8 iput-wide v8, v7, Lokhttp3/internal/b/c;->bpn:J const/4 v8, 0x0 goto :goto_2 :cond_3 invoke-interface {v8}, Ljava/util/List;->size()I move-result v8 :goto_2 if-lez v8, :cond_4 add-int/lit8 v6, v6, 0x1 goto :goto_0 :cond_4 add-int/lit8 v2, v2, 0x1 iget-wide v8, v7, Lokhttp3/internal/b/c;->bpn:J sub-long v8, p1, v8 cmp-long v10, v8, v3 if-lez v10, :cond_0 move-object v5, v7 move-wide v3, v8 goto :goto_0 :cond_5 iget-wide p1, p0, Lokhttp3/j;->bly:J cmp-long v0, v3, p1 if-gez v0, :cond_9 iget p1, p0, Lokhttp3/j;->blx:I if-le v2, p1, :cond_6 goto :goto_3 :cond_6 if-lez v2, :cond_7 iget-wide p1, p0, Lokhttp3/j;->bly:J sub-long/2addr p1, v3 monitor-exit p0 return-wide p1 :cond_7 if-lez v6, :cond_8 iget-wide p1, p0, Lokhttp3/j;->bly:J monitor-exit p0 return-wide p1 :cond_8 iput-boolean v1, p0, Lokhttp3/j;->blC:Z const-wide/16 p1, -0x1 monitor-exit p0 return-wide p1 :cond_9 :goto_3 iget-object p1, p0, Lokhttp3/j;->blA:Ljava/util/Deque; invoke-interface {p1, v5}, Ljava/util/Deque;->remove(Ljava/lang/Object;)Z monitor-exit p0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 iget-object p1, v5, Lokhttp3/internal/b/c;->bpg:Ljava/net/Socket; invoke-static {p1}, Lokhttp3/internal/c;->a(Ljava/net/Socket;)V const-wide/16 p1, 0x0 return-wide p1 :catchall_0 move-exception p1 :try_start_1 monitor-exit p0 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw p1 return-void .end method .method public static synthetic lambda$UN83HUNjRpluatXsySxi5LPD3pg(Lokhttp3/j;)V .locals 0 invoke-direct {p0}, Lokhttp3/j;->zX()V return-void .end method .method private synthetic zX()V .locals 6 :cond_0 :goto_0 invoke-static {}, Ljava/lang/System;->nanoTime()J move-result-wide v0 invoke-direct {p0, v0, v1}, Lokhttp3/j;->aj(J)J move-result-wide v0 const-wide/16 v2, -0x1 cmp-long v4, v0, v2 if-nez v4, :cond_1 return-void :cond_1 const-wide/16 v2, 0x0 cmp-long v4, v0, v2 if-lez v4, :cond_0 const-wide/32 v2, 0xf4240 div-long v4, v0, v2 mul-long v2, v2, v4 sub-long/2addr v0, v2 monitor-enter p0 long-to-int v1, v0 :try_start_0 invoke-virtual {p0, v4, v5, v1}, Ljava/lang/Object;->wait(JI)V :try_end_0 .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 goto :goto_1 :catchall_0 move-exception v0 goto :goto_2 :catch_0 :goto_1 :try_start_1 monitor-exit p0 goto :goto_0 :goto_2 monitor-exit p0 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw v0 return-void .end method