com.google.common.util.concurrent
Interface UninterruptibleFuture<V>

All Superinterfaces:
Future<V>

@Beta
public interface UninterruptibleFuture<V>
extends Future<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).

Since:
1
Author:
Kevin Bourrillion

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

get

V get()
      throws ExecutionException
Description copied from interface: java.util.concurrent.Future
Waits if necessary for the computation to complete, and then retrieves its result.

Specified by:
get in interface Future<V>
Returns:
the computed result
Throws:
ExecutionException - if the computation threw an exception

get

V get(long timeout,
      TimeUnit unit)
      throws ExecutionException,
             TimeoutException
Description copied from interface: java.util.concurrent.Future
Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.

Specified by:
get in interface Future<V>
Parameters:
timeout - the maximum time to wait
unit - the time unit of the timeout argument
Returns:
the computed result
Throws:
ExecutionException - if the computation threw an exception
TimeoutException - if the wait timed out