接口 AsyncListenableTaskExecutor

    • 方法详细资料

      • submitListenable

        ListenableFuture<?> submitListenable​(Runnable task)
        Submit a Runnable task for execution, receiving a ListenableFuture representing that task. The Future will return a null result upon completion.
        参数:
        task - the Runnable to execute (never null)
        返回:
        a ListenableFuture representing pending completion of the task
        抛出:
        TaskRejectedException - if the given task was not accepted
      • submitListenable

        <T> ListenableFuture<T> submitListenable​(Callable<T> task)
        Submit a Callable task for execution, receiving a ListenableFuture representing that task. The Future will return the Callable's result upon completion.
        参数:
        task - the Callable to execute (never null)
        返回:
        a ListenableFuture representing pending completion of the task
        抛出:
        TaskRejectedException - if the given task was not accepted