Repository: resilience4j/resilience4j (Java)

Issue:
Lock free sliding window implementation broke API going from 2.2.0 -> 2.3.0
The implementation for #2241 broke the API, and didn't provide a  default `SlidingWindowSynchronizationStrategy` in the API (nor a deprecation of the old method for constructing a circuitBreaker with slidingWindow:

```
		CircuitBreakerConfig circuitBreakerConfig = CircuitBreakerConfig.custom()
			.failureRateThreshold(50)
			.waitDurationInOpenState(Duration.ofSeconds(60))
			.permittedNumberOfCallsInHalfOpenState(10)
			.slidingWindow(100, 100, SlidingWindowType.COUNT_BASED)
			.build();

		circuitBreakerRegistry = CircuitBreakerRegistry.of(circuitBreakerConfig);
```
broke because `.slidingWindow()` now requires the synchronization strategy.

A better way is to keep the original method, and let that perform a default strategy and introduce the new method with the strategy, perhaps deprecating the old method suggesting users of the API to pick a synchronization strategy, and then in the next major release removing the deprecated API.

Also the JavaDoc didn't suggest which default was the original strategy (if it had any).



Fix (patch):
diff --git a/resilience4j-circuitbreaker/src/main/java/io/github/resilience4j/circuitbreaker/CircuitBreakerConfig.java b/resilience4j-circuitbreaker/src/main/java/io/github/resilience4j/circuitbreaker/CircuitBreakerConfig.java
index 43cf6d9e3..812a17072 100644
--- a/resilience4j-circuitbreaker/src/main/java/io/github/resilience4j/circuitbreaker/CircuitBreakerConfig.java
+++ b/resilience4j-circuitbreaker/src/main/java/io/github/resilience4j/circuitbreaker/CircuitBreakerConfig.java
@@ -671,6 +671,54 @@ public Builder slidingWindow(
             return this;
         }
 
+        /**
+         * Configures the sliding window which is used to record the outcome of calls when the
+         * CircuitBreaker is closed. {@code slidingWindowSize} configures the size of the sliding
+         * window. Sliding window can either be count-based or time-based, specified by {@code
+         * slidingWindowType}. {@code minimumNumberOfCalls} configures the minimum number of calls
+         * which are required (per sliding window period) before the CircuitBreaker can calculate
+         * the error rate. For example, if {@code minimumNumberOfCalls} is 10, then at least 10
+         * calls must be recorded, before the failure rate can be calculated. If only 9 calls have
+         * been recorded, the CircuitBreaker will not transition to open, even if all 9 calls have
+         * failed.
+         * <p>
+         * If {@code slidingWindowSize} is 100 and {@code slidingWindowType} is COUNT_BASED, the
+         * last 100 calls are recorded and aggregated. If {@code slidingWindowSize} is 10 and {@code
+         * slidingWindowType} is TIME_BASED, the calls of the last 10 seconds are recorded and
+         * aggregated.
+         * <p>
+         * The {@code slidingWindowSize} must be greater than 0. The {@code minimumNumberOfCalls}
+         * must be greater than 0. If the {@code slidingWindowType} is COUNT_BASED, the {@code
+         * minimumNumberOfCalls} may not be greater than {@code slidingWindowSize}. If a greater
+         * value is provided, {@code minimumNumberOfCalls} will be equal to {@code
+         * slidingWindowSize}. If the {@code slidingWindowType} is TIME_BASED, the {@code
+         * minimumNumberOfCalls} may be any amount.
+         * <p>
+         * Default slidingWindowSize is 100, minimumNumberOfCalls is 100 and slidingWindowType is
+         * COUNT_BASED.
+         * <p>
+         * Uses {@link SlidingWindowSynchronizationStrategy#SYNCHRONIZED} strategy by default.
+         *
+         * @see #slidingWindow(int, int, SlidingWindowType, SlidingWindowSynchronizationStrategy)
+         *
+         * @param slidingWindowSize    the size of the sliding window when the CircuitBreaker is
+         *                             closed.
+         * @param minimumNumberOfCalls the minimum number of calls that must be recorded before the
+         *                             failure rate can be calculated.
+         * @param slidingWindowType    the type of the sliding window. Either COUNT_BASED or
+         *                             TIME_BASED.
+         * @return the CircuitBreakerConfig.Builder
+         * @throws IllegalArgumentException if {@code slidingWindowSize < 1 || minimumNumberOfCalls
+         *                                  < 1}
+         */
+        public Builder slidingWindow(
+                int slidingWindowSize,
+                int minimumNumberOfCalls,
+                SlidingWindowType slidingWindowType
+        ) {
+            return slidingWindow(slidingWindowSize, minimumNumberOfCalls, slidingWindowType, DEFAULT_SLIDING_WINDOW_SYNCHRONIZATION_STRATEGY);
+        }
+
         /**
          * Configures the size of the sliding window which is used to record the outcome of calls
          * when the CircuitBreaker is closed. {@code slidingWindowSize} configures the size of the