code: private void completedTasklets(final TOutput output, final List<Integer> taskletIds)
        throws InterruptedException {
      final List<TInput> inputs = getInputs(taskletIds);
      final AggregateResult result = new AggregateResult(output, inputs);
  
      if (callbackHandler != null) {
        executor.execute(new Runnable() {
          @Override
          public void run() {
            callbackHandler.onSuccess(result);
          }
        });
      }
  
      resultQueue.put(new ImmutablePair<>(taskletIds, result));
    }
docs: Create and queue result for Tasklets that are expected and invoke callback.