Interface AsyncOutput<T>

    • Method Detail

      • async

        @NotNull Async<T> async​(@NotNull Duration timeout,
                                @NotNull TimeoutFallback fallback)
        If the timeout is expired before Async.resume() is called then the outcome is handled either as failed or successful, depending on the specified fallback.

        Do not call this method more than once. If an async method is called multiple times an exception is thrown.

        Parameters:
        timeout - Timeout that HiveMQ waits for the result of the async operation.
        fallback - Fallback behaviour if a timeout occurs. The outcome of the output for the fallback TimeoutFallback.SUCCESS or TimeoutFallback.FAILURE is specified in the implementation.
        Throws:
        UnsupportedOperationException - If async is called more than once.
        Since:
        4.0.0, CE 2019.1