java.lang.Object
io.lettuce.core.dynamic.DeclaredCommandMethod
- All Implemented Interfaces:
CommandMethod
public class DeclaredCommandMethod extends Object implements CommandMethod
Abstraction of a method that is designated to execute a Redis command method. Enriches the standard
Method interface
with specific information that is necessary to construct RedisCommand for the method.- Since:
- 5.0
- Author:
- Mark Paluch
-
Method Summary
Modifier and Type Method Description static CommandMethodcreate(Method method)Create a newDeclaredCommandMethodgiven aMethod.booleanequals(Object o)ResolvableTypegetActualReturnType()<A extends Annotation>
AgetAnnotation(Class<A> annotationClass)Lookup a method annotation.MethodgetMethod()StringgetName()Parameters<? extends Parameter>getParameters()ResolvableTypegetReturnType()booleanhasAnnotation(Class<? extends Annotation> annotationClass)inthashCode()booleanisBatchExecution()booleanisFutureExecution()booleanisReactiveExecution()StringtoString()
-
Method Details
-
create
Create a newDeclaredCommandMethodgiven aMethod.- Parameters:
method- must not be null.
-
getParameters
- Specified by:
getParametersin interfaceCommandMethod- Returns:
- the method
Parameters.
-
getMethod
- Specified by:
getMethodin interfaceCommandMethod- Returns:
- the
Method.
-
getReturnType
- Specified by:
getReturnTypein interfaceCommandMethod- Returns:
- declared
MethodreturnTypeInformation.
-
getActualReturnType
- Specified by:
getActualReturnTypein interfaceCommandMethod- Returns:
- the actual
MethodreturnTypeInformationafter unwrapping.
-
getAnnotation
Lookup a method annotation.- Specified by:
getAnnotationin interfaceCommandMethod- Parameters:
annotationClass- the annotation class.- Returns:
- the annotation object or
nullif not found.
-
hasAnnotation
- Specified by:
hasAnnotationin interfaceCommandMethod- Parameters:
annotationClass- the annotation class.- Returns:
trueif the method is annotated withannotationClass.
-
getName
- Specified by:
getNamein interfaceCommandMethod- Returns:
- the method name.
-
isFutureExecution
public boolean isFutureExecution()- Specified by:
isFutureExecutionin interfaceCommandMethod- Returns:
trueif the method uses asynchronous execution declaringFutureas result type.
-
isReactiveExecution
public boolean isReactiveExecution()- Specified by:
isReactiveExecutionin interfaceCommandMethod- Returns:
trueif the method uses reactive execution declaringPublisheras result type.
-
isBatchExecution
public boolean isBatchExecution()- Specified by:
isBatchExecutionin interfaceCommandMethod- Returns:
trueif the method defines aCommandBatchingargument.
-
equals
-
hashCode
public int hashCode() -
toString
-