From 67e471686b0ca8e680ae3ac6054184580758eb4f Mon Sep 17 00:00:00 2001
From: Michael-A-McMahon
* This method can used when configuring an Option
with values
* from a Supplier
:
- *
{@code + *{@code * void configurePassword(ConnectionFactoryOptions.Builder optionsBuilder) { * optionsBuilder.option(supplied(PASSWORD), () -> getPassword()); * } @@ -542,12 +542,14 @@ public static Set- *+ * }
* It is not strictly necessary to use this method when configuring an
* Option
with a value from a Supplier
. This method
* is offered for code readability and convenience.
*
* This method can used when configuring an Option
with values
* from a Publisher
:
- *
{@code + *{@code * void configurePassword(ConnectionFactoryOptions.Builder optionsBuilder) { * optionsBuilder.option(published(PASSWORD), getPasswordPublisher()); * } @@ -573,12 +575,14 @@ public static- *Option > supplied(Option option) { * Publisher getPasswordPublisher() { * // ... publish a database password ... * } - * } + * }
* It is not strictly necessary to use this method when configuring an
* Option
with a value from a Publisher
. This method
* is offered for code readability and convenience.
*
* However, the code above can result in: - *
+ ** reactor.core.Exceptions$StaticThrowable: Operator has been terminated - *+ *
* This seems to happen when the concatDelayError publisher receives a cancel * from a downstream subscriber after it has already received onComplete from * a upstream publisher.