Package com.couchbase.transactions.util
Class MonoBridge<T>
- java.lang.Object
-
- com.couchbase.transactions.util.MonoBridge<T>
-
@Internal public class MonoBridge<T> extends java.lang.Object
Protects against concurrent op cancellation.In reactive, if have multiple concurrent ops, if one fails then all the others will just stop executing once the error is raised past them in the chain. As if concurrent ops are being done with concatMap/flatMap, once the FluxConcatMap operator gets onError, it calls cancel() on its internal stream.
To avoid this, on a ctx.insert(), a MonoBridge is returned to the lambda and the actual work is started on a separate chain, whose signals are forwarded to the MonoBridge. That chain is then protected from any cancellation events, which the MonoBridge will receive.
Since this work, a CANCEL signal should not appear internally, and is possible indicative of an internal bug if it does.
-
-
Constructor Summary
Constructors Constructor Description MonoBridge(reactor.core.publisher.Mono<T> feedFrom, java.lang.String dbg, AttemptContextReactive syncer, TransactionLogger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<T>
external()
-
-
-
Constructor Detail
-
MonoBridge
public MonoBridge(reactor.core.publisher.Mono<T> feedFrom, java.lang.String dbg, AttemptContextReactive syncer, @Nullable TransactionLogger logger)
-
-
Method Detail
-
external
public reactor.core.publisher.Mono<T> external()
-
-