Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7846337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:33:06+00:00 2026-06-02T17:33:06+00:00

In Java 5, the ExecutorService interface declares the method: <T> List<Future<T>> invokeAll(Collection<Callable<T>> tasks) throws

  • 0

In Java 5, the ExecutorService interface declares the method:

<T> List<Future<T>> invokeAll(Collection<Callable<T>> tasks)
    throws InterruptedException;

whereas Guava 11.0.2, written in Java 6 but supposedly compatible with Java 5, overrides it in ListeningExecutorService as:

 <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
     throws InterruptedException;

If I want to implement my own ListeningExecutorService, I would need to implement both of these methods, but I am also not able to have two methods the same erasure, so it’s a bit of a Catch 22.

Is there any way around this problem? More specifically, is there any way to implement a ListeningExecutorService in Java 5?

As a side note to any Guava folks–is it actually necessary for Guava to re-declare this method since it’s already inherited from ExecutorService?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T17:33:09+00:00Added an answer on June 2, 2026 at 5:33 pm

    The way that we made this work was to override the JDK’s ExecutorService interface in our bootclasspath. You could do something similar during your project’s compilation. The easiest way to see our setup is probably the change that removed it for release 12 (since that release will require JDK6).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future;
I'm using java.util.concurrent.ExecutorService with fixed thread pool to execute list of tasks. My list
Possible Duplicate: Handling exceptions from Java ExecutorService tasks I use the ExecutorService from Java
Im using the ExecutorService in Java to invoke Threads with invokeAll() . After, I
With reference to the java.util.concurrent package and the Future interface I notice (unless I
I am using an unbounded, thread-caching Java-ExecutorService which concurrently processes my tasks. Now I
I'm coming from Java, where I'd submit Runnable s to an ExecutorService backed by
When running the following class the ExecutionService will often deadlock. import java.util.ArrayList; import java.util.Collection;
Is there any way to interrupt a Future without cancelling it? java doc API:
I'm looking for an ExecutorService implementation that can be provided with a timeout. Tasks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.