failsafe v2.4.0 Release Notes

  • ๐Ÿ‘Œ Improvements

    • โž• Added time based thresholding support to CircuitBreaker via:
      • withFailureThreshold(int failureThreshold, Duration failureThresholdingPeriod)
      • withFailureThreshold(int failureThreshold, int failureExecutionThreshold, Duration failureThresholdingPeriod)
      • withFailureRateThreshold(int failureRateThreshold, int failureExecutionThreshold, Duration failureThresholdingPeriod)
    • โž• Added getters to CircuitBreaker for existing count based thresholding settings:
      • getFailureThresholdingCapacity()
      • getSuccessThresholdingCapacity()
    • And added getters to CircuitBreaker for new time based thresholding settings:
      • getFailureRateThreshold()
      • getFailureExecutionThreshold()
      • getFailureThresholdingPeriod()
    • โž• Added some new metrics to CircuitBreaker:
      • getSuccessRate()
      • getFailureRate()
      • getExecutionCount()

    API Changes

    • ๐Ÿ”„ Changed the return type of CircuitBreaker's getFailureThreshold() and getSuccessThreshold() from Ratio to int. getFailureThresholdingCapacity, getFailureRateThreshold, getFailureExecutionThreshold, and getSuccessThresholdingCapacity provide additional detail about thresholding configuration.
    • โœ‚ Removed support for the previously deprecated CircuitBreaker.withTimeout. The Timeout policy should be used instead.