code: @Override
    public TOutput get(final long timeout, final TimeUnit unit)
        throws InterruptedException, ExecutionException, TimeoutException, CancellationException {
      if (!countDownLatch.await(timeout, unit)) {
        throw new TimeoutException("Waiting for the results of the task timed out. Timeout = " + timeout
                + " in time units: " + unit);
      }
  
      return get();
    }
docs: Wait a certain period of time for the result of the task.
  @throws TimeoutException if the timeout provided hits before the Tasklet is done.
  @throws InterruptedException if the thread is interrupted.
  @throws ExecutionException if the Tasklet execution failed to complete.
  @throws CancellationException if the Tasklet was cancelled.