Interface Callback<V>

  • Type Parameters:
    V - the target value type
    All Superinterfaces:
    Future<V>, Task
    All Known Implementing Classes:
    FocessCallback

    public interface Callback<V>
    extends Task, Future<V>
    The warped task. You can use this to handle callable processing
    • Method Detail

      • call

        V call()
        Call the target value
        Returns:
        the target value
      • waitCall

        default V waitCall()
        Wait for this task finished and call the target value
        Returns:
        the target value
      • isDone

        default boolean isDone()
        Indicate whether this task is done or not
        Specified by:
        isDone in interface Future<V>
        Returns:
        true if this task is finished, false otherwise
        See Also:
        Task.isFinished()
      • get

        default V get()
        Wait for this task finished and call the target value
        Specified by:
        get in interface Future<V>
        Returns:
        the target value
        See Also:
        waitCall()
      • get

        default V get​(long timeout,
                      TimeUnit unit)
        This method is not supported
        Specified by:
        get in interface Future<V>
        Parameters:
        timeout - not supported
        unit - not supported
        Returns:
        not supported