slidingWindow
fun slidingWindow(size: Int, minimumThroughput: Int = 100, type: SlidingWindowType = COUNT_BASED)(source)
Configures the sliding window used to record calls and calculate the failure rate.
Parameters
size
the size of the sliding window.
minimumThroughput
the minimum number of calls that need to be recorded in the sliding window for the failure rate to be calculated. Even if the failureRateThreshold is exceeded, the circuit breaker will not transition to the Open state if the number of calls recorded in the sliding window is less than this value.
type
the type of the sliding window. See SlidingWindowType for more information about the available types.