/** * @return true iff the circuit breaker limit must be enforced for processing this request. */ public boolean canTripCircuitBreaker(final Optional<RestHandler> handler) { return handler.map(h -> h.canTripCircuitBreaker()).orElse(true); }
/** * @return true iff the circuit breaker limit must be enforced for processing this request. */ public boolean canTripCircuitBreaker(final Optional<RestHandler> handler) { return handler.map(h -> h.canTripCircuitBreaker()).orElse(true); }
/** * @return true iff the circuit breaker limit must be enforced for processing this request. */ public boolean canTripCircuitBreaker(final Optional<RestHandler> handler) { return handler.map(h -> h.canTripCircuitBreaker()).orElse(true); }
/** * @param request The current request. Must not be null. * @return true iff the circuit breaker limit must be enforced for processing this request. */ public boolean canTripCircuitBreaker(RestRequest request) { RestHandler handler = getHandler(request); return (handler != null) ? handler.canTripCircuitBreaker() : true; }
/** * @param request The current request. Must not be null. * @return true iff the circuit breaker limit must be enforced for processing this request. */ public boolean canTripCircuitBreaker(RestRequest request) { RestHandler handler = getHandler(request); return (handler != null) ? handler.canTripCircuitBreaker() : true; }