Interface AsyncStatus<K extends Serializable>

Type Parameters:
K - type of task id
All Superinterfaces:
Serializable
All Known Implementing Classes:
BulkStatus

public interface AsyncStatus<K extends Serializable> extends Serializable
Interface to be implemented by asynchronous services' statuses.
Since:
10.3
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    Gets the error code if any.
    default String
    Gets the error message if any.
    Gets the asynchronous task id.
    default boolean
    Checks if there is any error.
    boolean
    Returns true if command is completed.
  • Method Details

    • getId

      K getId()
      Gets the asynchronous task id.
    • isCompleted

      boolean isCompleted()
      Returns true if command is completed.
    • getErrorMessage

      default String getErrorMessage()
      Gets the error message if any.
      Returns:
      the error message if any, null otherwise
      Since:
      11.5
    • getErrorCode

      default int getErrorCode()
      Gets the error code if any.
      Returns:
      the error code if any, 0 otherwise
      Since:
      11.5
    • hasError

      default boolean hasError()
      Checks if there is any error.
      Returns:
      true if there is any error, false otherwise
      Since:
      11.5