public final class FunctionTagging extends Object
io.reactivex.functions
function types and appends
the user-specified tag to the exception the wrapped function produces.
The tagging can be optionally enabled before assembling flows, thus the overhead can be limited to when diagnosing problems around failing functions.
Each functional type has its own {code tagX} postfix to avoid lambda ambiguity.
Modifier and Type | Class and Description |
---|---|
static class |
FunctionTagging.FunctionTaggingException
The stackless tagging exception appended to the chain of causes of
the original exception thrown by the wrapped function.
|
Modifier and Type | Method and Description |
---|---|
static void |
disable()
Disable the function tagging wrappers in the
tagX methods. |
static void |
enable()
Enable the function tagging wrappers in the
tagX methods. |
static boolean |
isEnabled()
Returns true if the function tagging wrappers are enabled.
|
static <T1,T2,R> BiFunction<T1,T2,R> |
tagBiFunction(BiFunction<T1,T2,R> func,
String tag) |
static <T,R> Function<T,R> |
tagFunction(Function<T,R> func,
String tag) |
static <T1,T2,T3,R> |
tagFunction3(Function3<T1,T2,T3,R> func,
String tag) |
static <T1,T2,T3,T4,R> |
tagFunction4(Function4<T1,T2,T3,T4,R> func,
String tag) |
static <T1,T2,T3,T4,T5,R> |
tagFunction5(Function5<T1,T2,T3,T4,T5,R> func,
String tag) |
static <T1,T2,T3,T4,T5,T6,R> |
tagFunction6(Function6<T1,T2,T3,T4,T5,T6,R> func,
String tag) |
static <T1,T2,T3,T4,T5,T6,T7,R> |
tagFunction7(Function7<T1,T2,T3,T4,T5,T6,T7,R> func,
String tag) |
static <T1,T2,T3,T4,T5,T6,T7,T8,R> |
tagFunction8(Function8<T1,T2,T3,T4,T5,T6,T7,T8,R> func,
String tag) |
static <T1,T2,T3,T4,T5,T6,T7,T8,T9,R> |
tagFunction9(Function9<T1,T2,T3,T4,T5,T6,T7,T8,T9,R> func,
String tag) |
public static void enable()
tagX
methods.public static void disable()
tagX
methods.
Note that disabling doesn't remove the wrappers from previously tagged functions.
public static boolean isEnabled()
public static <T1,T2,R> BiFunction<T1,T2,R> tagBiFunction(BiFunction<T1,T2,R> func, String tag)
public static <T1,T2,T3,R> Function3<T1,T2,T3,R> tagFunction3(Function3<T1,T2,T3,R> func, String tag)
public static <T1,T2,T3,T4,R> Function4<T1,T2,T3,T4,R> tagFunction4(Function4<T1,T2,T3,T4,R> func, String tag)
public static <T1,T2,T3,T4,T5,R> Function5<T1,T2,T3,T4,T5,R> tagFunction5(Function5<T1,T2,T3,T4,T5,R> func, String tag)
public static <T1,T2,T3,T4,T5,T6,R> Function6<T1,T2,T3,T4,T5,T6,R> tagFunction6(Function6<T1,T2,T3,T4,T5,T6,R> func, String tag)
public static <T1,T2,T3,T4,T5,T6,T7,R> Function7<T1,T2,T3,T4,T5,T6,T7,R> tagFunction7(Function7<T1,T2,T3,T4,T5,T6,T7,R> func, String tag)
public static <T1,T2,T3,T4,T5,T6,T7,T8,R> Function8<T1,T2,T3,T4,T5,T6,T7,T8,R> tagFunction8(Function8<T1,T2,T3,T4,T5,T6,T7,T8,R> func, String tag)