final class RouteDatabase
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Set<Route> |
failedRoutes |
Constructor and Description |
---|
RouteDatabase() |
Modifier and Type | Method and Description |
---|---|
void |
connected(Route route)
Records success connecting to
route . |
void |
failed(Route failedRoute)
Records a failure connecting to
failedRoute . |
boolean |
shouldPostpone(Route route)
Returns true if
route has failed recently and should be avoided. |
private final java.util.Set<Route> failedRoutes
public void failed(Route failedRoute)
failedRoute
.public void connected(Route route)
route
.public boolean shouldPostpone(Route route)
route
has failed recently and should be avoided.