Package org.infinispan.commons.reactive
Class RxJavaInterop
java.lang.Object
org.infinispan.commons.reactive.RxJavaInterop
- Direct Known Subclasses:
- RxJavaInterop
Static factory class that provides methods to obtain commonly used instances for interoperation between RxJava
 and standard JRE.
- Since:
- 10.0
- Author:
- wburns
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic <R> io.reactivex.rxjava3.functions.Function<? super Throwable, org.reactivestreams.Publisher<R>> static <R> io.reactivex.rxjava3.processors.FlowableProcessor<R> Returns aFlowableProcessorthat is already complete and will ignore any value submitted to it and will immediately cancel any subscriptions it receives.static <R> io.reactivex.rxjava3.functions.Consumer<R> static <K,V> io.reactivex.rxjava3.functions.Function <Map.Entry<K, V>, K> Provides aFunctionthat can be used to convert from an instance ofMap.Entryto the key of the entry.static <K,V> io.reactivex.rxjava3.functions.Function <Map.Entry<K, V>, V> Provides aFunctionthat can be used to convert from an instance ofMap.Entryto the value of the entry.static <R> io.reactivex.rxjava3.functions.Function<R, R> static <R> io.reactivex.rxjava3.core.Flowable<R> voidCompletionStageToFlowable(CompletionStage<?> stage) Transforms a void completable future into a flowable.
- 
Constructor Details- 
RxJavaInteropprotected RxJavaInterop()
 
- 
- 
Method Details- 
entryToKeyFunctionProvides aFunctionthat can be used to convert from an instance ofMap.Entryto the key of the entry. This is useful for the instance passed to a method likeFlowable.map(Function).- Type Parameters:
- K- key type
- V- value type
- Returns:
- rxjava function to convert from a Map.Entry to its key.
 
- 
entryToValueFunctionpublic static <K,V> io.reactivex.rxjava3.functions.Function<Map.Entry<K,V>, entryToValueFunction()V> Provides aFunctionthat can be used to convert from an instance ofMap.Entryto the value of the entry. This is useful for the instance passed to a method likeFlowable.map(Function).- Type Parameters:
- K- key type
- V- value type
- Returns:
- rxjava function to convert from a Map.Entry to its value.
 
- 
cacheExceptionWrapperpublic static <R> io.reactivex.rxjava3.functions.Function<? super Throwable,org.reactivestreams.Publisher<R>> cacheExceptionWrapper()
- 
identityFunctionpublic static <R> io.reactivex.rxjava3.functions.Function<R,R> identityFunction()
- 
emptyConsumerpublic static <R> io.reactivex.rxjava3.functions.Consumer<R> emptyConsumer()
- 
completedFlowableProcessorpublic static <R> io.reactivex.rxjava3.processors.FlowableProcessor<R> completedFlowableProcessor()Returns aFlowableProcessorthat is already complete and will ignore any value submitted to it and will immediately cancel any subscriptions it receives.- Type Parameters:
- R- user value type
- Returns:
- processor that is completed
 
- 
voidCompletionStageToFlowablepublic static <R> io.reactivex.rxjava3.core.Flowable<R> voidCompletionStageToFlowable(CompletionStage<?> stage) Transforms a void completable future into a flowable.The flowable completes without emitting any value. - Type Parameters:
- R- : A generic type for the flowable.
- Parameters:
- stage- : Completable future to transform.
- Returns:
- A Flowable that completes once the completable future completes.
 
 
-