File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
src/main/java/dev/failsafe/internal Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,9 @@ public synchronized void handleConfigChange() {
4444 */
4545 @ Override
4646 synchronized void checkThreshold (ExecutionContext <R > context ) {
47- // Execution threshold will only be set for time based thresholding
47+ // Execution threshold can only be set for time based thresholding
4848 if (stats .getExecutionCount () >= config .getFailureExecutionThreshold ()) {
49+ // Failure rate threshold can only be set for time based thresholding
4950 double failureRateThreshold = config .getFailureRateThreshold ();
5051 if ((failureRateThreshold != 0 && stats .getFailureRate () >= failureRateThreshold ) || (failureRateThreshold == 0
5152 && stats .getFailureCount () >= config .getFailureThreshold ()))
Original file line number Diff line number Diff line change @@ -68,8 +68,10 @@ synchronized void checkThreshold(ExecutionContext<R> context) {
6868 successesExceeded = stats .getSuccessCount () >= successThreshold ;
6969 failuresExceeded = stats .getFailureCount () > successThresholdingCapacity - successThreshold ;
7070 } else {
71+ // Failure rate threshold can only be set for time based thresholding
7172 int failureRateThreshold = config .getFailureRateThreshold ();
7273 if (failureRateThreshold != 0 ) {
74+ // Execution threshold can only be set for time based thresholding
7375 boolean executionThresholdExceeded = stats .getExecutionCount () >= config .getFailureExecutionThreshold ();
7476 failuresExceeded = executionThresholdExceeded && stats .getFailureRate () >= failureRateThreshold ;
7577 successesExceeded = executionThresholdExceeded && stats .getSuccessRate () > 100 - failureRateThreshold ;
You can’t perform that action at this time.
0 commit comments