public interface ConsulFailoverStrategy
| Modifier and Type | Method and Description |
|---|---|
Optional<okhttp3.Request> |
computeNextStage(okhttp3.Request previousRequest,
okhttp3.Response previousResponse)
Computes the next failover stage for the consul failover strategy.
|
boolean |
isRequestViable(okhttp3.Request current)
Determines if there is a viable candidate for the next request.
|
void |
markRequestFailed(okhttp3.Request current)
Marks the specified request as a failed URL (in case of exceptions and other events that could cause
us to never get a response.
|
@Nullable Optional<okhttp3.Request> computeNextStage(@Nonnull okhttp3.Request previousRequest, @Nullable okhttp3.Response previousResponse)
previousRequest - The last request to go out the door.previousResponse - The response that returned when previousRequest was completed.boolean isRequestViable(@Nonnull okhttp3.Request current)
current - The current inflight request.void markRequestFailed(@Nonnull okhttp3.Request current)
current - The current request object representing a request that failedCopyright © 2019. All rights reserved.