|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Beta public interface UninterruptibleFuture<V>
A Future
whose get
calls cannot be interrupted. If a thread
is interrupted during such a call, the call continues to block until the
result is available or the timeout elapses, and only then re-interrupts the
thread. Obtain an instance of this type using Futures.makeUninterruptible(Future)
.
Method Summary | |
---|---|
V |
get()
Waits if necessary for the computation to complete, and then retrieves its result. |
V |
get(long timeout,
TimeUnit unit)
Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available. |
Methods inherited from interface java.util.concurrent.Future |
---|
cancel, isCancelled, isDone |
Method Detail |
---|
V get() throws ExecutionException
java.util.concurrent.Future
get
in interface Future<V>
ExecutionException
- if the computation threw an
exceptionV get(long timeout, TimeUnit unit) throws ExecutionException, TimeoutException
java.util.concurrent.Future
get
in interface Future<V>
timeout
- the maximum time to waitunit
- the time unit of the timeout argument
ExecutionException
- if the computation threw an
exception
TimeoutException
- if the wait timed out
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |