code: public void setLimit(int limit) {
          FailureInterpreter fi = getFailureInterpreter();
          if (!(fi instanceof DefaultFailureInterpreter)) {
              throw new IllegalStateException("setLimit() not supported: this CircuitBreaker's FailureInterpreter isn't a DefaultFailureInterpreter.");
          }
          ((DefaultFailureInterpreter)fi).setLimit(limit);
      }
docs: Specifies the failure tolerance limit for the {@link
  DefaultFailureInterpreter} that comes with a {@link
  CircuitBreaker} by default.
  @see DefaultFailureInterpreter
  @param limit the number of tolerated failures in a window