Skip to content

Commit

Permalink
Improve javadoc of deprecated repeat and retry extensions
Browse files Browse the repository at this point in the history
This change adds information about the required runtime dependency of
reactor-extras for the deprecated extension methods for repeat and retry
operations.
  • Loading branch information
chemicL committed Jul 26, 2023
1 parent 62bd1f0 commit af81205
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 16 deletions.
32 changes: 24 additions & 8 deletions src/main/kotlin/reactor/kotlin/extra/retry/RepeatExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ import java.util.function.Consumer
*
* @author Simon Baslé
* @since 3.1.1
* @deprecated Reactor-Extra repeat features are being phased out. To be removed at the earliest in 1.3.0.
* @deprecated Reactor-Extra repeat features are being phased out. If you still
* need to call it, io.projectreactor:reactor-extras runtime dependency is needed.
* To be removed at the earliest in 1.3.0.
*/
@Deprecated(message = "Reactor-Extra repeat features are being phased out.")
@Deprecated(message = "Reactor-Extra repeat features are being phased out. " +
"If you still need to call it, io.projectreactor:reactor-extras " +
"runtime dependency is needed.")
fun <T> Flux<T>.repeatExponentialBackoff(times: Long, first: Duration, max: Duration? = null,
jitter: Boolean = false,
doOnRepeat: ((RepeatContext<T>) -> Unit)? = null): Flux<T> {
Expand All @@ -65,9 +69,13 @@ fun <T> Flux<T>.repeatExponentialBackoff(times: Long, first: Duration, max: Dura
*
* @author Simon Baslé
* @since 3.1.1
* @deprecated Reactor-Extra repeat features are being phased out. To be removed at the earliest in 1.3.0.
* @deprecated Reactor-Extra repeat features are being phased out. If you still
* need to call it, io.projectreactor:reactor-extras runtime dependency is needed.
* To be removed at the earliest in 1.3.0.
*/
@Deprecated(message = "Reactor-Extra repeat features are being phased out.")
@Deprecated(message = "Reactor-Extra repeat features are being phased out. " +
"If you still need to call it, io.projectreactor:reactor-extras " +
"runtime dependency is needed.")
fun <T> Flux<T>.repeatRandomBackoff(times: Long, first: Duration, max: Duration? = null,
doOnRepeat: ((RepeatContext<T>) -> Unit)? = null): Flux<T> {
val repeat = Repeat.times<T>(times)
Expand All @@ -93,9 +101,13 @@ fun <T> Flux<T>.repeatRandomBackoff(times: Long, first: Duration, max: Duration?
*
* @author Simon Baslé
* @since 3.1.1
* @deprecated Reactor-Extra repeat features are being phased out. To be removed at the earliest in 1.3.0.
* @deprecated Reactor-Extra repeat features are being phased out. If you still
* need to call it, io.projectreactor:reactor-extras runtime dependency is needed.
* To be removed at the earliest in 1.3.0.
*/
@Deprecated(message = "Reactor-Extra repeat features are being phased out.")
@Deprecated(message = "Reactor-Extra repeat features are being phased out. " +
"If you still need to call it, io.projectreactor:reactor-extras " +
"runtime dependency is needed.")
fun <T> Mono<T>.repeatExponentialBackoff(times: Long, first: Duration, max: Duration? = null,
jitter: Boolean = false,
doOnRepeat: ((RepeatContext<T>) -> Unit)? = null): Flux<T> {
Expand All @@ -121,9 +133,13 @@ fun <T> Mono<T>.repeatExponentialBackoff(times: Long, first: Duration, max: Dura
*
* @author Simon Baslé
* @since 3.1.1
* @deprecated Reactor-Extra repeat features are being phased out. To be removed at the earliest in 1.3.0.
* @deprecated Reactor-Extra repeat features are being phased out. If you still
* need to call it, io.projectreactor:reactor-extras runtime dependency is needed.
* To be removed at the earliest in 1.3.0.
*/
@Deprecated(message = "Reactor-Extra repeat features are being phased out.")
@Deprecated(message = "Reactor-Extra repeat features are being phased out. " +
"If you still need to call it, io.projectreactor:reactor-extras " +
"runtime dependency is needed.")
fun <T> Mono<T>.repeatRandomBackoff(times: Long, first: Duration, max: Duration? = null,
doOnRepeat: ((RepeatContext<T>) -> Unit)? = null): Flux<T> {
val repeat = Repeat.times<T>(times)
Expand Down
24 changes: 16 additions & 8 deletions src/main/kotlin/reactor/kotlin/extra/retry/RetryExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ import java.util.function.Consumer
* @author Simon Baslé
* @since 3.1.1
* @deprecated Reactor-Extra retry features have been replaced by a core alternative and will be removed.
* To be removed at the earliest in 1.3.0.
* If you still need to call it, io.projectreactor:reactor-extras runtime dependency is needed.
* To be removed at the earliest in 1.3.0.
*/
@Deprecated(message = "Reactor-Extra retry features have been replaced by a core alternative and will be removed.")
@Deprecated(message = "Reactor-Extra retry features have been replaced by a core alternative and will be removed. " +
"If you still need to call this method, io.projectreactor:reactor-extras runtime dependency is needed.")
fun <T> Flux<T>.retryExponentialBackoff(times: Long, first: Duration, max: Duration? = null,
jitter: Boolean = false,
doOnRetry: ((RetryContext<T>) -> Unit)? = null): Flux<T> {
Expand Down Expand Up @@ -68,9 +70,11 @@ fun <T> Flux<T>.retryExponentialBackoff(times: Long, first: Duration, max: Durat
* @author Simon Baslé
* @since 3.1.1
* @deprecated Reactor-Extra retry features have been replaced by a core alternative and will be removed.
* To be removed at the earliest in 1.3.0.
* If you still need to call it, io.projectreactor:reactor-extras runtime dependency is needed.
* To be removed at the earliest in 1.3.0.
*/
@Deprecated(message = "Reactor-Extra retry features have been replaced by a core alternative and will be removed.")
@Deprecated(message = "Reactor-Extra retry features have been replaced by a core alternative and will be removed. " +
"If you still need to call this method, io.projectreactor:reactor-extras runtime dependency is needed.")
fun <T> Flux<T>.retryRandomBackoff(times: Long, first: Duration, max: Duration? = null,
doOnRetry: ((RetryContext<T>) -> Unit)? = null): Flux<T> {
val retry = Retry.any<T>()
Expand All @@ -97,9 +101,11 @@ fun <T> Flux<T>.retryRandomBackoff(times: Long, first: Duration, max: Duration?
* @author Simon Baslé
* @since 3.1.1
* @deprecated Reactor-Extra retry features have been replaced by a core alternative and will be removed.
* To be removed at the earliest in 1.3.0.
* If you still need to call it, io.projectreactor:reactor-extras runtime dependency is needed.
* To be removed at the earliest in 1.3.0.
*/
@Deprecated(message = "Reactor-Extra retry features have been replaced by a core alternative and will be removed.")
@Deprecated(message = "Reactor-Extra retry features have been replaced by a core alternative and will be removed. " +
"If you still need to call this method, io.projectreactor:reactor-extras runtime dependency is needed.")
fun <T> Mono<T>.retryExponentialBackoff(times: Long, first: Duration, max: Duration? = null,
jitter: Boolean = false,
doOnRetry: ((RetryContext<T>) -> Unit)? = null): Mono<T> {
Expand Down Expand Up @@ -127,9 +133,11 @@ fun <T> Mono<T>.retryExponentialBackoff(times: Long, first: Duration, max: Durat
* @author Simon Baslé
* @since 3.1.1
* @deprecated Reactor-Extra retry features have been replaced by a core alternative and will be removed.
* To be removed at the earliest in 1.3.0.
* If you still need to call it, io.projectreactor:reactor-extras runtime dependency is needed.
* To be removed at the earliest in 1.3.0.
*/
@Deprecated(message = "Reactor-Extra retry features have been replaced by a core alternative and will be removed.")
@Deprecated(message = "Reactor-Extra retry features have been replaced by a core alternative and will be removed. " +
"If you still need to call this method, io.projectreactor:reactor-extras runtime dependency is needed.")
fun <T> Mono<T>.retryRandomBackoff(times: Long, first: Duration, max: Duration? = null,
doOnRetry: ((RetryContext<T>) -> Unit)? = null): Mono<T> {
val retry = Retry.any<T>()
Expand Down

0 comments on commit af81205

Please sign in to comment.