Class UserFunctions
java.lang.Object
io.confluent.parallelconsumer.internal.UserFunctions
Single entry point for wrapping the actual execution of user functions
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <PARAM_ONE,
PARAM_TWO, RESULT>
RESULTcarefullyRun
(BiFunction<PARAM_ONE, PARAM_TWO, RESULT> wrappedFunction, PARAM_ONE userFuncParamOne, PARAM_TWO userFuncParamTwo) static <PARAM> void
carefullyRun
(Consumer<PARAM> wrappedFunction, PARAM userFuncParam) static <PARAM,
RESULT>
RESULTcarefullyRun
(Function<PARAM, RESULT> wrappedFunction, PARAM userFuncParam)
-
Field Details
-
MSG
- See Also:
-
-
Method Details
-
carefullyRun
public static <PARAM_ONE,PARAM_TWO, RESULT carefullyRunRESULT> (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
-