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 Summary
-
Method Summary
Modifier and Type Method Description static <PARAM_ONE, PARAM_TWO, RESULT>
RESULTcarefullyRun(BiFunction<PARAM_ONE,PARAM_TWO,RESULT> wrappedFunction, PARAM_ONE userFuncParamOne, PARAM_TWO userFuncParamTwo)static <PARAM> voidcarefullyRun(Consumer<PARAM> wrappedFunction, PARAM userFuncParam)static <PARAM, RESULT>
RESULTcarefullyRun(Function<PARAM,RESULT> wrappedFunction, PARAM userFuncParam)
-
Field Details
-
MSG
- See Also:
- Constant Field Values
-
-
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 functionPARAM_TWO- the second in type for the user functionRESULT- the out type for the user function- Parameters:
wrappedFunction- the function to runuserFuncParamOne- a parameter to pass into the user's functionuserFuncParamTwo- 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 functionRESULT- the out type for the user function- Parameters:
wrappedFunction- the function to runuserFuncParam- the parameter to pass into the user's function
-
carefullyRun
- Type Parameters:
PARAM- the in type for the user function- Parameters:
wrappedFunction- the function to runuserFuncParam- the parameter to pass into the user's function
-