Class UserFunctions

java.lang.Object
io.confluent.parallelconsumer.internal.UserFunctions

public final class UserFunctions extends Object
Single entry point for wrapping the actual execution of user functions
  • Field Details

  • Method Details

    • carefullyRun

      public static <PARAM_ONE, PARAM_TWO, RESULT> RESULT carefullyRun(BiFunction<PARAM_ONE,PARAM_TWO,RESULT> wrappedFunction, PARAM_ONE userFuncParamOne, PARAM_TWO userFuncParamTwo)
      Type Parameters:
      PARAM_ONE - the first in type for the user function
      PARAM_TWO - the second in type for the user function
      RESULT - the out type for the user function
      Parameters:
      wrappedFunction - the function to run
      userFuncParamOne - a parameter to pass into the user's function
      userFuncParamTwo - a parameter to pass into the user's function
    • carefullyRun

      public static <PARAM, RESULT> RESULT carefullyRun(Function<PARAM,RESULT> wrappedFunction, PARAM userFuncParam)
      Type Parameters:
      PARAM - the in type for the user function
      RESULT - the out type for the user function
      Parameters:
      wrappedFunction - the function to run
      userFuncParam - the parameter to pass into the user's function
    • carefullyRun

      public static <PARAM> void carefullyRun(Consumer<PARAM> wrappedFunction, PARAM userFuncParam)
      Type Parameters:
      PARAM - the in type for the user function
      Parameters:
      wrappedFunction - the function to run
      userFuncParam - the parameter to pass into the user's function