docs: public void record(CircuitBreakerStateImpl.CircuitBreakerResult result) {
          boolean isFailure = (result == FAILURE);
          if (resultCount < size) {
              // Window is not yet full
              resultCount++;
          } else {
              // Window is full, roll off the oldest result
              boolean oldestResultIsFailure = results.get(nextResultIndex);
              if (oldestResultIsFailure) {
                  failures--;
              }
          }
  
          results.set(nextResultIndex, isFailure);
          if (isFailure) {
              failures++;
          }
  
          nextResultIndex++;
          if (nextResultIndex >= size) {
              nextResultIndex = 0;
          }
      }