Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve javadoc of deprecated repeat and retry extensions #58

Merged
merged 2 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 this method, 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 this method, 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 this method, 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 this method, 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 this method, 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 this method, 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 this method, 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 this method, 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 this method, 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 this method, 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 this method, 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 this method, 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
Loading