java.lang.Object
io.lettuce.core.dynamic.parameter.Parameters<ExecutionSpecificParameters.ExecutionAwareParameter>
io.lettuce.core.dynamic.parameter.ExecutionSpecificParameters
- All Implemented Interfaces:
Iterable<ExecutionSpecificParameters.ExecutionAwareParameter>
public class ExecutionSpecificParameters extends Parameters<ExecutionSpecificParameters.ExecutionAwareParameter>
Parameters-implementation specific to execution. This implementation considers Timeout for a command method
applying the appropriate synchronization and CommandBatching to batch commands.- Since:
- 5.0
- Author:
- Mark Paluch
- See Also:
Timeout,CommandBatching
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExecutionSpecificParameters.ExecutionAwareParameter -
Constructor Summary
Constructors Constructor Description ExecutionSpecificParameters(Method method)Create newExecutionSpecificParametersgiven aMethod. -
Method Summary
Modifier and Type Method Description protected ExecutionSpecificParameters.ExecutionAwareParametercreateParameter(Method method, int parameterIndex)intgetCommandBatchingIndex()intgetTimeoutIndex()booleanhasCommandBatchingIndex()booleanhasTimeoutIndex()Methods inherited from class io.lettuce.core.dynamic.parameter.Parameters
getBindableParameter, getBindableParameters, getParameters, iteratorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ExecutionSpecificParameters
Create newExecutionSpecificParametersgiven aMethod.- Parameters:
method- must not benull.
-
-
Method Details
-
getTimeoutIndex
public int getTimeoutIndex()- Returns:
- the timeout argument index if present, or -1 if the command method declares a
Timeoutparameter.
-
getCommandBatchingIndex
public int getCommandBatchingIndex()- Returns:
- the command batching argument index if present, or -1 if the command method declares a
CommandBatchingparameter.
-
createParameter
protected ExecutionSpecificParameters.ExecutionAwareParameter createParameter(Method method, int parameterIndex)Description copied from class:Parameters- Specified by:
createParameterin classParameters<ExecutionSpecificParameters.ExecutionAwareParameter>- Parameters:
method- must not benull.parameterIndex- the parameter index.- Returns:
- the
Parameter.
-
hasCommandBatchingIndex
public boolean hasCommandBatchingIndex()- Returns:
trueif the method defines aCommandBatchingparameter.
-
hasTimeoutIndex
public boolean hasTimeoutIndex()- Returns:
trueif the method defines aTimeoutparameter.
-