Class ExecutionSpecificParameters
- 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 considersTimeout
for a command method applying the appropriate synchronization andCommandBatching
to batch commands.- Since:
- 5.0
- Author:
- Mark Paluch
- See Also:
Timeout
,CommandBatching
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExecutionSpecificParameters.ExecutionAwareParameter
-
Constructor Summary
Constructors Constructor Description ExecutionSpecificParameters(Method method)
Create newExecutionSpecificParameters
given aMethod
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ExecutionSpecificParameters.ExecutionAwareParameter
createParameter(Method method, int parameterIndex)
int
getCommandBatchingIndex()
int
getTimeoutIndex()
boolean
hasCommandBatchingIndex()
boolean
hasTimeoutIndex()
-
Methods inherited from class io.lettuce.core.dynamic.parameter.Parameters
getBindableParameter, getBindableParameters, getParameters, iterator
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
ExecutionSpecificParameters
public ExecutionSpecificParameters(Method method)
Create newExecutionSpecificParameters
given aMethod
.- Parameters:
method
- must not benull
.
-
-
Method Detail
-
getTimeoutIndex
public int getTimeoutIndex()
- Returns:
- the timeout argument index if present, or -1 if the command method declares a
Timeout
parameter.
-
getCommandBatchingIndex
public int getCommandBatchingIndex()
- Returns:
- the command batching argument index if present, or -1 if the command method declares a
CommandBatching
parameter.
-
createParameter
protected ExecutionSpecificParameters.ExecutionAwareParameter createParameter(Method method, int parameterIndex)
Description copied from class:Parameters
- Specified by:
createParameter
in classParameters<ExecutionSpecificParameters.ExecutionAwareParameter>
- Parameters:
method
- must not benull
.parameterIndex
- the parameter index.- Returns:
- the
Parameter
.
-
hasCommandBatchingIndex
public boolean hasCommandBatchingIndex()
- Returns:
true
if the method defines aCommandBatching
parameter.
-
hasTimeoutIndex
public boolean hasTimeoutIndex()
- Returns:
true
if the method defines aTimeout
parameter.
-
-