- All Known Implementing Classes:
DeclaredCommandMethod
public interface 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 ResolvableTypegetActualReturnType()<A extends Annotation>
AgetAnnotation(Class<A> annotationClass)Lookup a method annotation.MethodgetMethod()StringgetName()Parameters<? extends Parameter>getParameters()ResolvableTypegetReturnType()booleanhasAnnotation(Class<? extends Annotation> annotationClass)booleanisBatchExecution()booleanisFutureExecution()booleanisReactiveExecution()
-
Method Details
-
getParameters
Parameters<? extends Parameter> getParameters()- Returns:
- the method
Parameters.
-
getMethod
Method getMethod()- Returns:
- the
Method.
-
getReturnType
ResolvableType getReturnType()- Returns:
- declared
MethodreturnTypeInformation.
-
getActualReturnType
ResolvableType getActualReturnType()- Returns:
- the actual
MethodreturnTypeInformationafter unwrapping.
-
getAnnotation
Lookup a method annotation.- Parameters:
annotationClass- the annotation class.- Returns:
- the annotation object or
nullif not found.
-
hasAnnotation
- Parameters:
annotationClass- the annotation class.- Returns:
trueif the method is annotated withannotationClass.
-
getName
String getName()- Returns:
- the method name.
-
isFutureExecution
boolean isFutureExecution()- Returns:
trueif the method uses asynchronous execution declaringFutureas result type.
-
isReactiveExecution
boolean isReactiveExecution()- Returns:
trueif the method uses reactive execution declaringPublisheras result type.
-
isBatchExecution
boolean isBatchExecution()- Returns:
trueif the method defines aCommandBatchingargument.
-