forked from ReactiveX/RxJava
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue ReactiveX#348: Spring boot2 support for retry
* Add response predicate to retry sync and async for enhancement ReactiveX#259 * ReactiveX#348 add sync retry spring boot annotation and config support for spring boot 1 and 2 * ReactiveX#348 add sync retry spring boot annotation and config support for spring boot 1 and 2 * ReactiveX#348 adding java doc * ReactiveX#348 adding java doc * ReactiveX#348 adding spring override bean option for the retry spring boot starters * ReactiveX#348 adding spring async retry aspect support * ReactiveX#348 adding annotation validation protection of using retry and async retry annotation together in the class level * ReactiveX#348 updating java doc * ReactiveX#348 adding the new prefix of async retry metrics and fixing the merge conflicts * ReactiveX#348 covering review comments * ReactiveX#348 removing unneeded lines * ReactiveX#348 adding the updated spring boot documentation for the retry spring boot usage for spring boot 1 and 2 * ReactiveX#348 documentation review comments * ReactiveX#348 documentation review comments and removing health indicators for retry support in spring boot * ReactiveX#348 documentation review comments
- Loading branch information
Showing
49 changed files
with
3,325 additions
and
250 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
...ience4j-annotations/src/main/java/io/github/resilience4j/retry/annotation/AsyncRetry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2019 Mahmoud Romeh | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.github.resilience4j.retry.annotation; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* This annotation can be applied to a class or a specific method. | ||
* Applying it on a class is equivalent to applying it on all its public methods. | ||
* The annotation enables backend retry for all methods where it is applied. | ||
* Backend retry is performed via a retry | ||
*/ | ||
@Retention(value = RetentionPolicy.RUNTIME) | ||
@Target(value = {ElementType.METHOD, ElementType.TYPE}) | ||
@Documented | ||
public @interface AsyncRetry { | ||
|
||
/** | ||
* Name of the async retry. | ||
* | ||
* @return return name of the async retry | ||
*/ | ||
String name(); | ||
} |
41 changes: 41 additions & 0 deletions
41
resilience4j-annotations/src/main/java/io/github/resilience4j/retry/annotation/Retry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2019 Mahmoud Romeh | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.github.resilience4j.retry.annotation; | ||
|
||
import java.lang.annotation.Documented; | ||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* This annotation can be applied to a class or a specific method. | ||
* Applying it on a class is equivalent to applying it on all its public methods. | ||
* The annotation enables backend retry for all methods where it is applied. | ||
* Backend retry is performed via a retry | ||
*/ | ||
@Retention(value = RetentionPolicy.RUNTIME) | ||
@Target(value = {ElementType.METHOD, ElementType.TYPE}) | ||
@Documented | ||
public @interface Retry { | ||
|
||
/** | ||
* Name of the sync retry. | ||
* | ||
* @return the name of the sync retry. | ||
*/ | ||
String name(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.