Module lettuce.core

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 standard Method interface with specific information that is necessary to construct RedisCommand for the method.
Since:
5.0
Author:
Mark Paluch
  • Method Details

    • getParameters

      Parameters<? extends Parameter> getParameters()
      Returns:
      the method Parameters.
    • getMethod

      Method getMethod()
      Returns:
      the Method.
    • getReturnType

      ResolvableType getReturnType()
      Returns:
      declared Method return TypeInformation.
    • getActualReturnType

      ResolvableType getActualReturnType()
      Returns:
      the actual Method return TypeInformation 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 with annotationClass.
    • getName

      String getName()
      Returns:
      the method name.
    • isFutureExecution

      boolean isFutureExecution()
      Returns:
      true if the method uses asynchronous execution declaring Future as result type.
    • isReactiveExecution

      boolean isReactiveExecution()
      Returns:
      true if the method uses reactive execution declaring Publisher as result type.
    • isBatchExecution

      boolean isBatchExecution()
      Returns:
      true if the method defines a CommandBatching argument.