cz.cuni.amis.utils.future
Interface IFuture<RESULT>

Package class diagram package IFuture
All Superinterfaces:
Future<RESULT>
All Known Implementing Classes:
CombinedBooleanFuture, FixedFuture, FlagFuture, FutureWrapper, RunnableFuture

public interface IFuture<RESULT>
extends Future<RESULT>


Method Summary
 RESULT get()
          Waits if necessary for the computation to complete, and then retrieves its result.
 RESULT 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

RESULT get()
           throws PogamutInterruptedException
Waits if necessary for the computation to complete, and then retrieves its result.

Specified by:
get in interface Future<RESULT>
Returns:
the computed result
Throws:
PogamutInterruptedException - if the current thread was interrupted while waiting

get

RESULT get(long timeout,
           TimeUnit unit)
           throws PogamutInterruptedException,
                  PogamutCancellationException,
                  PogamutTimeoutException
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<RESULT>
Parameters:
timeout - the maximum time to wait
unit - the time unit of the timeout argument
Returns:
the computed result
Throws:
PogamutCancellationException - if the computation was cancelled
PogamutInterruptedException - if the current thread was interrupted while waiting
PogamutTimeoutException - if the wait timed out


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.