test_class.declarator: lazyExecutorService
test_class.modifier: private
test_class.original_string: private LazyExecutorService lazyExecutorService;
test_class.type: LazyExecutorService
test_class.var_name: lazyExecutorService
test_class.file: util/src/test/java/com/google/cloud/hadoop/util/LazyExecutorServiceTest.java
test_class.identifier: LazyExecutorServiceTest
test_case.body: @Test
    public void testInvokeAllSubmitAllTasks() throws Exception {
      List<Callable<Void>> tasks = ImmutableList.of(() -> null, () -> null);
      List<Future<Void>> futures = lazyExecutorService.invokeAll(tasks);
      assertThat(futures).hasSize(2);
    }
test_case.class_method_signature: LazyExecutorServiceTest.testInvokeAllSubmitAllTasks()
test_case.full_signature: @Test public void testInvokeAllSubmitAllTasks()
test_case.identifier: testInvokeAllSubmitAllTasks
test_case.invocations: of invokeAll hasSize assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testInvokeAllSubmitAllTasks()
focal_class.declarator: shutdown = false
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean shutdown = false;
focal_class.type: boolean
focal_class.var_name: shutdown
focal_class.declarator: backingService
focal_class.modifier: private final
focal_class.original_string: private final ExecutorService backingService;
focal_class.type: ExecutorService
focal_class.var_name: backingService
focal_class.declarator: terminated = new CountDownLatch(1)
focal_class.modifier: private final
focal_class.original_string: private final CountDownLatch terminated = new CountDownLatch(1);
focal_class.type: CountDownLatch
focal_class.var_name: terminated
focal_class.declarator: pendingTasks =
        Collections.newSetFromMap(new MapMaker().weakKeys().<ExecutingFuture<?>, Boolean>makeMap())
focal_class.modifier: private final
focal_class.original_string: private final Set<ExecutingFuture<?>> pendingTasks =
        Collections.newSetFromMap(new MapMaker().weakKeys().<ExecutingFuture<?>, Boolean>makeMap());
focal_class.type: Set<ExecutingFuture<?>>
focal_class.var_name: pendingTasks
focal_class.declarator: tasksAndTerminationLock = new ReentrantLock()
focal_class.modifier: private final
focal_class.original_string: private final ReentrantLock tasksAndTerminationLock = new ReentrantLock();
focal_class.type: ReentrantLock
focal_class.var_name: tasksAndTerminationLock
focal_class.file: util/src/main/java/com/google/cloud/hadoop/util/LazyExecutorService.java
focal_class.identifier: LazyExecutorService
focal_class.interfaces: implements ExecutorService
focal_class.class_method_signature: LazyExecutorService.LazyExecutorService()
focal_class.full_signature: public  LazyExecutorService()
focal_class.identifier: LazyExecutorService
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  LazyExecutorService()
focal_class.class_method_signature: LazyExecutorService.LazyExecutorService(ExecutorService backingService)
focal_class.full_signature: public  LazyExecutorService(ExecutorService backingService)
focal_class.identifier: LazyExecutorService
focal_class.modifiers: public
focal_class.parameters: (ExecutorService backingService)
focal_class.signature:  LazyExecutorService(ExecutorService backingService)
focal_class.class_method_signature: LazyExecutorService.removePendingTask(ExecutingFutureImpl<?> f)
focal_class.full_signature: private void removePendingTask(ExecutingFutureImpl<?> f)
focal_class.identifier: removePendingTask
focal_class.modifiers: private
focal_class.parameters: (ExecutingFutureImpl<?> f)
focal_class.return: void
focal_class.signature: void removePendingTask(ExecutingFutureImpl<?> f)
focal_class.class_method_signature: LazyExecutorService.updateTerminationState()
focal_class.full_signature: private void updateTerminationState()
focal_class.identifier: updateTerminationState
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void updateTerminationState()
focal_class.class_method_signature: LazyExecutorService.shutdown()
focal_class.full_signature: @Override public void shutdown()
focal_class.identifier: shutdown
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void shutdown()
focal_class.class_method_signature: LazyExecutorService.shutdownNow()
focal_class.full_signature: @CanIgnoreReturnValue @Override public List<Runnable> shutdownNow()
focal_class.identifier: shutdownNow
focal_class.modifiers: @CanIgnoreReturnValue @Override public
focal_class.parameters: ()
focal_class.return: List<Runnable>
focal_class.signature: List<Runnable> shutdownNow()
focal_class.class_method_signature: LazyExecutorService.isShutdown()
focal_class.full_signature: @Override public boolean isShutdown()
focal_class.identifier: isShutdown
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isShutdown()
focal_class.class_method_signature: LazyExecutorService.checkBackingService()
focal_class.full_signature: private void checkBackingService()
focal_class.identifier: checkBackingService
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void checkBackingService()
focal_class.class_method_signature: LazyExecutorService.isTerminated()
focal_class.full_signature: @Override public boolean isTerminated()
focal_class.identifier: isTerminated
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isTerminated()
focal_class.class_method_signature: LazyExecutorService.awaitTermination(long timeout, TimeUnit unit)
focal_class.full_signature: @Override public boolean awaitTermination(long timeout, TimeUnit unit)
focal_class.identifier: awaitTermination
focal_class.modifiers: @Override public
focal_class.parameters: (long timeout, TimeUnit unit)
focal_class.return: boolean
focal_class.signature: boolean awaitTermination(long timeout, TimeUnit unit)
focal_class.class_method_signature: LazyExecutorService.submit(final Callable<T> task)
focal_class.full_signature: @Override public Future<T> submit(final Callable<T> task)
focal_class.identifier: submit
focal_class.modifiers: @Override public
focal_class.parameters: (final Callable<T> task)
focal_class.return: Future<T>
focal_class.signature: Future<T> submit(final Callable<T> task)
focal_class.class_method_signature: LazyExecutorService.submit(Runnable task, T result)
focal_class.full_signature: @Override public Future<T> submit(Runnable task, T result)
focal_class.identifier: submit
focal_class.modifiers: @Override public
focal_class.parameters: (Runnable task, T result)
focal_class.return: Future<T>
focal_class.signature: Future<T> submit(Runnable task, T result)
focal_class.class_method_signature: LazyExecutorService.submit(Runnable command)
focal_class.full_signature: @Override public Future<?> submit(Runnable command)
focal_class.identifier: submit
focal_class.modifiers: @Override public
focal_class.parameters: (Runnable command)
focal_class.return: Future<?>
focal_class.signature: Future<?> submit(Runnable command)
focal_class.class_method_signature: LazyExecutorService.invokeAll(Collection<? extends Callable<T>> tasks)
focal_class.full_signature: @CanIgnoreReturnValue @Override public List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
focal_class.identifier: invokeAll
focal_class.modifiers: @CanIgnoreReturnValue @Override public
focal_class.parameters: (Collection<? extends Callable<T>> tasks)
focal_class.return: List<Future<T>>
focal_class.signature: List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
focal_class.class_method_signature: LazyExecutorService.invokeAll(
        Collection<? extends Callable<T>> tasks, final long timeout, final TimeUnit unit)
focal_class.full_signature: @CanIgnoreReturnValue @Override public List<Future<T>> invokeAll(
        Collection<? extends Callable<T>> tasks, final long timeout, final TimeUnit unit)
focal_class.identifier: invokeAll
focal_class.modifiers: @CanIgnoreReturnValue @Override public
focal_class.parameters: (
        Collection<? extends Callable<T>> tasks, final long timeout, final TimeUnit unit)
focal_class.return: List<Future<T>>
focal_class.signature: List<Future<T>> invokeAll(
        Collection<? extends Callable<T>> tasks, final long timeout, final TimeUnit unit)
focal_class.class_method_signature: LazyExecutorService.createMonitorTasksFor(
        List<Future<T>> futures, long timeout, @Nullable TimeUnit unit)
focal_class.full_signature: private static List<Callable<Void>> createMonitorTasksFor(
        List<Future<T>> futures, long timeout, @Nullable TimeUnit unit)
focal_class.identifier: createMonitorTasksFor
focal_class.modifiers: private static
focal_class.parameters: (
        List<Future<T>> futures, long timeout, @Nullable TimeUnit unit)
focal_class.return: List<Callable<Void>>
focal_class.signature: List<Callable<Void>> createMonitorTasksFor(
        List<Future<T>> futures, long timeout, @Nullable TimeUnit unit)
focal_class.class_method_signature: LazyExecutorService.invokeAny(Collection<? extends Callable<T>> tasks)
focal_class.full_signature: @Override public T invokeAny(Collection<? extends Callable<T>> tasks)
focal_class.identifier: invokeAny
focal_class.modifiers: @Override public
focal_class.parameters: (Collection<? extends Callable<T>> tasks)
focal_class.return: T
focal_class.signature: T invokeAny(Collection<? extends Callable<T>> tasks)
focal_class.class_method_signature: LazyExecutorService.invokeAny(
        final Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
focal_class.full_signature: @Override public T invokeAny(
        final Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
focal_class.identifier: invokeAny
focal_class.modifiers: @Override public
focal_class.parameters: (
        final Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
focal_class.return: T
focal_class.signature: T invokeAny(
        final Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
focal_class.class_method_signature: LazyExecutorService.execute(Runnable command)
focal_class.full_signature: @Override public void execute(Runnable command)
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: (Runnable command)
focal_class.return: void
focal_class.signature: void execute(Runnable command)
focal_method.body: @CanIgnoreReturnValue
    @Override
    public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
        throws InterruptedException {
      List<Future<T>> result = Lists.newLinkedList();
      try {
        for (Callable<T> task : tasks) {
          result.add(submit(task));
        }
        List<Callable<Void>> monitorTasks = createMonitorTasksFor(result, 0, null);
        backingService.invokeAll(monitorTasks);
      } finally {
        // Clean up. These are no-ops for completed tasks.
        for (Future<T> future : result) {
          future.cancel(true);
        }
      }
      return result;
    }
focal_method.class_method_signature: LazyExecutorService.invokeAll(Collection<? extends Callable<T>> tasks)
focal_method.full_signature: @CanIgnoreReturnValue @Override public List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
focal_method.identifier: invokeAll
focal_method.invocations: newLinkedList add submit createMonitorTasksFor invokeAll cancel
focal_method.modifiers: @CanIgnoreReturnValue @Override public
focal_method.parameters: (Collection<? extends Callable<T>> tasks)
focal_method.return: List<Future<T>>
focal_method.signature: List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)