what-the-bank/sources/okhttp3/internal/connection/RouteDatabase.java

35 lines
859 B
Java

package okhttp3.internal.connection;
import java.util.LinkedHashSet;
import java.util.Set;
import o.C14957gcv;
import okhttp3.Route;
/* loaded from: classes.dex */
public final class RouteDatabase {
private final Set<Route> failedRoutes = new LinkedHashSet();
public final void failed(Route route) {
synchronized (this) {
C14957gcv.e(route, "");
this.failedRoutes.add(route);
}
}
public final void connected(Route route) {
synchronized (this) {
C14957gcv.e(route, "");
this.failedRoutes.remove(route);
}
}
public final boolean shouldPostpone(Route route) {
boolean contains;
synchronized (this) {
C14957gcv.e(route, "");
contains = this.failedRoutes.contains(route);
}
return contains;
}
}