cz.cuni.amis.utils.future
Interface IFuture<RESULT>
- All Superinterfaces:
- java.util.concurrent.Future<RESULT>
- All Known Implementing Classes:
- CombinedBooleanFuture, FixedFuture, FlagFuture, FutureWrapper, RunnableFuture
public interface IFuture<RESULT>
- extends java.util.concurrent.Future<RESULT>
Method Summary |
RESULT |
get()
Waits if necessary for the computation to complete, and then
retrieves its result. |
RESULT |
get(long timeout,
java.util.concurrent.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 |
get
RESULT get()
throws PogamutInterruptedException
- Waits if necessary for the computation to complete, and then
retrieves its result.
- Specified by:
get
in interface java.util.concurrent.Future<RESULT>
- Returns:
- the computed result
- Throws:
PogamutInterruptedException
- if the current thread was interrupted while waiting
get
RESULT get(long timeout,
java.util.concurrent.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 java.util.concurrent.Future<RESULT>
- Parameters:
timeout
- the maximum time to waitunit
- 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