Package org.infinispan.commons.reactive
Class RxJavaInterop
- java.lang.Object
-
- org.infinispan.commons.reactive.RxJavaInterop
-
public class RxJavaInterop extends Object
Static factory class that provides methods to obtain commonly used instances for interoperation between RxJava and standard JRE.- Since:
- 10.0
- Author:
- wburns
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RxJavaInterop()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <R> io.reactivex.rxjava3.functions.Function<? super Throwable,org.reactivestreams.Publisher<R>>
cacheExceptionWrapper()
static <R> io.reactivex.rxjava3.functions.Consumer<R>
emptyConsumer()
static <K,V>
io.reactivex.rxjava3.functions.Function<Map.Entry<K,V>,K>entryToKeyFunction()
Provides aFunction
that can be used to convert from an instance ofMap.Entry
to the key of the entry.static <R> io.reactivex.rxjava3.functions.Function<R,R>
identityFunction()
-
-
-
Method Detail
-
entryToKeyFunction
public static <K,V> io.reactivex.rxjava3.functions.Function<Map.Entry<K,V>,K> entryToKeyFunction()
Provides aFunction
that can be used to convert from an instance ofMap.Entry
to the key of the entry. This is useful for the instance passed to a method likeFlowable.map(Function)
.- Type Parameters:
K
- key typeV
- value type- Returns:
- rxjava function to convert from a Map.Entry to its key.
-
cacheExceptionWrapper
public static <R> io.reactivex.rxjava3.functions.Function<? super Throwable,org.reactivestreams.Publisher<R>> cacheExceptionWrapper()
-
identityFunction
public static <R> io.reactivex.rxjava3.functions.Function<R,R> identityFunction()
-
emptyConsumer
public static <R> io.reactivex.rxjava3.functions.Consumer<R> emptyConsumer()
-
-