Class FunctionTagging


  • public final class FunctionTagging
    extends Object
    Wraps the regular 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.

    Since:
    0.17.4
    • Method Detail

      • enable

        public static void enable()
        Enable the function tagging wrappers in the tagX methods.
      • disable

        public static void disable()
        Disable the function tagging wrappers in the tagX methods.

        Note that disabling doesn't remove the wrappers from previously tagged functions.

      • isEnabled

        public static boolean isEnabled()
        Returns true if the function tagging wrappers are enabled.
        Returns:
        true if the function tagging wrappers are enabled
      • tagBiFunction

        public static <T1,​T2,​R> BiFunction<T1,​T2,​R> tagBiFunction​(BiFunction<T1,​T2,​R> func,
                                                                                          String tag)
      • tagFunction3

        public static <T1,​T2,​T3,​R> Function3<T1,​T2,​T3,​R> tagFunction3​(Function3<T1,​T2,​T3,​R> func,
                                                                                                          String tag)
      • tagFunction4

        public static <T1,​T2,​T3,​T4,​R> Function4<T1,​T2,​T3,​T4,​R> tagFunction4​(Function4<T1,​T2,​T3,​T4,​R> func,
                                                                                                                            String tag)
      • tagFunction5

        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)
      • tagFunction6

        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)
      • tagFunction7

        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)
      • tagFunction8

        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)
      • tagFunction9

        public static <T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8,​T9,​R> Function9<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)