Can you try using Future.get() to check if the task got completed ?
it is a blocking call and may block until the task gets completed.
Post that invoking future.isDone() may return TRUE. I guess
You can try calling get(..) with an extremely short timeout. If it returns a value, it was completed.
If you get a TimeoutException, it wasn't.
If you get any other of the possible exceptions, it was either cancelled, failed, or was interrupted
When you call Future.get() method, there is 4 possible outcomes:
You get the result value
You get CancellationException - if the computation was cancelled (e.g. Future.cancel(true) is called)
You get ExecutionException - if the computation threw an exception
You get InterruptedException - if the current
thread was interrupted while waiting (e.g. executor.shutdownNow() is called)