File tree 22 files changed +64
-41
lines changed
main/java/org/springframework/core/retry
test/java/org/springframework/core/retry
22 files changed +64
-41
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry ;
17
18
18
19
import java .time .Duration ;
@@ -32,4 +33,4 @@ public interface BackOffPolicy {
32
33
*/
33
34
Duration backOff ();
34
35
35
- }
36
+ }
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry ;
17
18
18
19
import org .springframework .core .retry .support .listener .CompositeRetryListener ;
@@ -57,4 +58,4 @@ default void onFailure(Exception exception) {
57
58
default void onMaxAttempts (Exception exception ) {
58
59
}
59
60
60
- }
61
+ }
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry ;
17
18
18
19
import java .util .concurrent .Callable ;
@@ -41,3 +42,4 @@ public interface RetryOperations {
41
42
<R > @ Nullable R execute (Callable <R > retryCallback ) throws Exception ;
42
43
43
44
}
45
+
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry ;
17
18
18
19
/**
@@ -30,4 +31,4 @@ public interface RetryPolicy {
30
31
*/
31
32
int getMaxAttempts ();
32
33
33
- }
34
+ }
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry ;
17
18
18
19
import java .time .Duration ;
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry .support ;
17
18
18
19
import org .springframework .core .retry .RetryPolicy ;
@@ -30,4 +31,4 @@ public int getMaxAttempts() {
30
31
return Integer .MAX_VALUE ;
31
32
}
32
33
33
- }
34
+ }
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry .support ;
17
18
18
19
import org .springframework .core .retry .RetryPolicy ;
@@ -42,4 +43,4 @@ public int getMaxAttempts() {
42
43
return this .maxAttempts ;
43
44
}
44
45
45
- }
46
+ }
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry .support ;
17
18
18
19
import org .springframework .core .retry .RetryPolicy ;
@@ -30,4 +31,4 @@ public int getMaxAttempts() {
30
31
return 0 ;
31
32
}
32
33
33
- }
34
+ }
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry .support .backoff ;
17
18
18
19
import java .time .Duration ;
@@ -35,4 +36,4 @@ public Duration backOff() {
35
36
return this .duration ;
36
37
}
37
38
38
- }
39
+ }
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry .support .backoff ;
17
18
18
19
import java .time .Duration ;
@@ -42,4 +43,4 @@ public Duration backOff() {
42
43
return this .duration ;
43
44
}
44
45
45
- }
46
+ }
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry .support .backoff ;
17
18
18
19
import java .time .Duration ;
@@ -32,4 +33,4 @@ public Duration backOff() {
32
33
return Duration .ZERO ;
33
34
}
34
35
35
- }
36
+ }
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry .support .backoff ;
17
18
18
19
import java .time .Duration ;
@@ -35,4 +36,4 @@ public Duration backOff() {
35
36
return this .duration ;
36
37
}
37
38
38
- }
39
+ }
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry .support .listener ;
17
18
18
19
import java .util .LinkedList ;
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry ;
17
18
18
19
import java .time .Duration ;
@@ -76,4 +77,4 @@ void testRetryWithFailure() {
76
77
// then
77
78
assertThatThrownBy (throwingCallable ).hasMessage ("Error while invoking service" );
78
79
}
79
- }
80
+ }
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry .support ;
17
18
18
19
import org .junit .jupiter .api .Test ;
@@ -32,4 +33,4 @@ void testGetMaxAttempts() {
32
33
33
34
assertThat (retryPolicy .getMaxAttempts ()).isEqualTo (Integer .MAX_VALUE );
34
35
}
35
- }
36
+ }
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry .support ;
17
18
18
19
import org .junit .jupiter .api .Test ;
@@ -40,4 +41,4 @@ void testInvalidGetMaxAttempts() {
40
41
assertThatThrownBy (() -> new MaxAttemptsRetryPolicy (0 ))
41
42
.hasMessage ("Max attempts must be greater than zero" );
42
43
}
43
- }
44
+ }
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry .support ;
17
18
18
19
import org .junit .jupiter .api .Test ;
@@ -32,4 +33,4 @@ void testGetMaxAttempts() {
32
33
33
34
assertThat (retryPolicy .getMaxAttempts ()).isEqualTo (0 );
34
35
}
35
- }
36
+ }
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2025 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.
13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .core .retry .support .backoff ;
17
18
18
19
import java .time .Duration ;
@@ -38,4 +39,4 @@ void testExponentialBackOff() {
38
39
assertThat (backOffPolicy .backOff ()).isEqualTo (Duration .ofSeconds (16 ));
39
40
assertThat (backOffPolicy .backOff ()).isEqualTo (Duration .ofSeconds (32 ));
40
41
}
41
- }
42
+ }
You can’t perform that action at this time.
0 commit comments