code: public void invoke(Runnable r) throws Exception {
          if (!byPass) {
              if (!allowRequest()) {
                  throw mapException(new CircuitBreakerException());
              }
  
              try {
                  isAttemptLive = true;
                  r.run();
                  close();
                  return;
              } catch (Throwable cause) {
                  handleFailure(cause);
              }
              throw new IllegalStateException("not possible");
          }
          else {
              r.run();
          }
      }
docs: Wrap the given service call with the {@link CircuitBreaker}
  protection logic.
  @param r the {@link Runnable} to attempt
  @throws CircuitBreakerException if the
  breaker was OPEN or HALF_CLOSED and this attempt wasn't the
  reset attempt
  @throws Exception if <code>c</code> throws one during
  execution