-
public final class RouteDatabaseA blacklist of failed routes to avoid when creating a new connection to a target address. This is used so that OkHttp can learn from its mistakes: if there was a failure attempting to connect to a specific IP address or proxy server, that failure is remembered and alternate routes are preferred.
-
-
Method Summary
Modifier and Type Method Description synchronized voidfailed(Route failedRoute)Records a failure connecting to {@code failedRoute}.synchronized voidconnected(Route route)Records success connecting to {@code route}.synchronized booleanshouldPostpone(Route route)Returns true if {@code route}has failed recently and should be avoided.-
-
Method Detail
-
failed
synchronized void failed(Route failedRoute)
Records a failure connecting to
{@code failedRoute}.
-
shouldPostpone
synchronized boolean shouldPostpone(Route route)
Returns true if
{@code route}has failed recently and should be avoided.
-
-
-
-