Package io.lettuce.core.dynamic
Interface CommandMethod
-
- All Known Implementing Classes:
DeclaredCommandMethod
public interface CommandMethod
Abstraction of a method that is designated to execute a Redis command method. Enriches the standardMethod
interface with specific information that is necessary to constructRedisCommand
for the method.- Since:
- 5.0
- Author:
- Mark Paluch
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResolvableType
getActualReturnType()
<A extends Annotation>
AgetAnnotation(Class<A> annotationClass)
Lookup a method annotation.Method
getMethod()
String
getName()
Parameters<? extends Parameter>
getParameters()
ResolvableType
getReturnType()
boolean
hasAnnotation(Class<? extends Annotation> annotationClass)
boolean
isBatchExecution()
boolean
isFutureExecution()
boolean
isReactiveExecution()
-
-
-
Method Detail
-
getParameters
Parameters<? extends Parameter> getParameters()
- Returns:
- the method
Parameters
.
-
getReturnType
ResolvableType getReturnType()
- Returns:
- declared
Method
returnTypeInformation
.
-
getActualReturnType
ResolvableType getActualReturnType()
- Returns:
- the actual
Method
returnTypeInformation
after unwrapping.
-
getAnnotation
<A extends Annotation> A getAnnotation(Class<A> annotationClass)
Lookup a method annotation.- Parameters:
annotationClass
- the annotation class.- Returns:
- the annotation object or
null
if not found.
-
hasAnnotation
boolean hasAnnotation(Class<? extends Annotation> annotationClass)
- Parameters:
annotationClass
- the annotation class.- Returns:
true
if the method is annotated withannotationClass
.
-
getName
String getName()
- Returns:
- the method name.
-
isFutureExecution
boolean isFutureExecution()
- Returns:
true
if the method uses asynchronous execution declaringFuture
as result type.
-
isReactiveExecution
boolean isReactiveExecution()
- Returns:
true
if the method uses reactive execution declaringPublisher
as result type.
-
isBatchExecution
boolean isBatchExecution()
- Returns:
true
if the method defines aCommandBatching
argument.
-
-