File tree 2 files changed +7
-2
lines changed
spring-core/src/main/java/org/springframework/util/backoff
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2024 the original author or authors.
2
+ * Copyright 2002-2025 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -85,6 +85,7 @@ public class ExponentialBackOff implements BackOff {
85
85
*/
86
86
public static final int DEFAULT_MAX_ATTEMPTS = Integer .MAX_VALUE ;
87
87
88
+
88
89
private long initialInterval = DEFAULT_INITIAL_INTERVAL ;
89
90
90
91
private double multiplier = DEFAULT_MULTIPLIER ;
@@ -204,6 +205,7 @@ public int getMaxAttempts() {
204
205
return this .maxAttempts ;
205
206
}
206
207
208
+
207
209
@ Override
208
210
public BackOffExecution start () {
209
211
return new ExponentialBackOffExecution ();
@@ -225,6 +227,7 @@ public String toString() {
225
227
.toString ();
226
228
}
227
229
230
+
228
231
private class ExponentialBackOffExecution implements BackOffExecution {
229
232
230
233
private long currentInterval = -1 ;
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2018 the original author or authors.
2
+ * Copyright 2002-2025 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -35,6 +35,7 @@ public class FixedBackOff implements BackOff {
35
35
*/
36
36
public static final long UNLIMITED_ATTEMPTS = Long .MAX_VALUE ;
37
37
38
+
38
39
private long interval = DEFAULT_INTERVAL ;
39
40
40
41
private long maxAttempts = UNLIMITED_ATTEMPTS ;
@@ -86,6 +87,7 @@ public long getMaxAttempts() {
86
87
return this .maxAttempts ;
87
88
}
88
89
90
+
89
91
@ Override
90
92
public BackOffExecution start () {
91
93
return new FixedBackOffExecution ();
You can’t perform that action at this time.
0 commit comments