From af812052f911f0a61c99cf5bb0058197778d6b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dariusz=20J=C4=99drzejczyk?= Date: Wed, 26 Jul 2023 13:14:41 +0200 Subject: [PATCH] Improve javadoc of deprecated repeat and retry extensions This change adds information about the required runtime dependency of reactor-extras for the deprecated extension methods for repeat and retry operations. --- .../kotlin/extra/retry/RepeatExtensions.kt | 32 ++++++++++++++----- .../kotlin/extra/retry/RetryExtensions.kt | 24 +++++++++----- 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/src/main/kotlin/reactor/kotlin/extra/retry/RepeatExtensions.kt b/src/main/kotlin/reactor/kotlin/extra/retry/RepeatExtensions.kt index cf21103..a1a7d8f 100644 --- a/src/main/kotlin/reactor/kotlin/extra/retry/RepeatExtensions.kt +++ b/src/main/kotlin/reactor/kotlin/extra/retry/RepeatExtensions.kt @@ -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 Flux.repeatExponentialBackoff(times: Long, first: Duration, max: Duration? = null, jitter: Boolean = false, doOnRepeat: ((RepeatContext) -> Unit)? = null): Flux { @@ -65,9 +69,13 @@ fun Flux.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 Flux.repeatRandomBackoff(times: Long, first: Duration, max: Duration? = null, doOnRepeat: ((RepeatContext) -> Unit)? = null): Flux { val repeat = Repeat.times(times) @@ -93,9 +101,13 @@ fun Flux.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 Mono.repeatExponentialBackoff(times: Long, first: Duration, max: Duration? = null, jitter: Boolean = false, doOnRepeat: ((RepeatContext) -> Unit)? = null): Flux { @@ -121,9 +133,13 @@ fun Mono.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 Mono.repeatRandomBackoff(times: Long, first: Duration, max: Duration? = null, doOnRepeat: ((RepeatContext) -> Unit)? = null): Flux { val repeat = Repeat.times(times) diff --git a/src/main/kotlin/reactor/kotlin/extra/retry/RetryExtensions.kt b/src/main/kotlin/reactor/kotlin/extra/retry/RetryExtensions.kt index 23081c4..9076abe 100644 --- a/src/main/kotlin/reactor/kotlin/extra/retry/RetryExtensions.kt +++ b/src/main/kotlin/reactor/kotlin/extra/retry/RetryExtensions.kt @@ -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 Flux.retryExponentialBackoff(times: Long, first: Duration, max: Duration? = null, jitter: Boolean = false, doOnRetry: ((RetryContext) -> Unit)? = null): Flux { @@ -68,9 +70,11 @@ fun Flux.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 Flux.retryRandomBackoff(times: Long, first: Duration, max: Duration? = null, doOnRetry: ((RetryContext) -> Unit)? = null): Flux { val retry = Retry.any() @@ -97,9 +101,11 @@ fun Flux.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 Mono.retryExponentialBackoff(times: Long, first: Duration, max: Duration? = null, jitter: Boolean = false, doOnRetry: ((RetryContext) -> Unit)? = null): Mono { @@ -127,9 +133,11 @@ fun Mono.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 Mono.retryRandomBackoff(times: Long, first: Duration, max: Duration? = null, doOnRetry: ((RetryContext) -> Unit)? = null): Mono { val retry = Retry.any()