java.lang.Object
org.miaixz.bus.http.accord.RouteDatabase
A blacklist of failed routes to avoid when creating new connections to a target address. If a failure occurs when
attempting to connect to a specific IP address or proxy server, that failure is remembered and alternate routes will
be preferred.
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RouteDatabase
public RouteDatabase()
-
-
Method Details
-
failed
Records a failure connecting toroute.- Parameters:
route- The route that failed.
-
connected
Records a successful connection toroute.- Parameters:
route- The route that successfully connected.
-
shouldPostpone
Returns true ifroutehas recently failed and should be avoided.- Parameters:
route- The route to check.- Returns:
trueif the route should be postponed.
-