|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.utils.future.CombinedBooleanFuture
public class CombinedBooleanFuture
Used to combine multiple Future<Boolean> together into one Future<Boolean>.
During construction of the instance of this class you have to specify an array of booleans you want to combine - then all methods will wait for all futures to end (e.g. get(), etc.).
Note that you will probably want to use getAll() method to get respective Future results.
| Constructor Summary | |
|---|---|
CombinedBooleanFuture(IFuture<Boolean>[] futures)
|
|
| Method Summary | |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
|
Boolean |
get()
Waits if necessary for the computation to complete, and then retrieves its result. |
Boolean |
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. |
Boolean[] |
getAll(long timeout,
TimeUnit unit)
|
Future<Boolean>[] |
getFutures()
|
boolean |
isCancelled()
|
boolean |
isDone()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CombinedBooleanFuture(IFuture<Boolean>[] futures)
| Method Detail |
|---|
public boolean cancel(boolean mayInterruptIfRunning)
cancel in interface Future<Boolean>public Boolean get()
IFuture
get in interface IFuture<Boolean>get in interface Future<Boolean>
public Boolean get(long timeout,
TimeUnit unit)
IFuture
get in interface IFuture<Boolean>get in interface Future<Boolean>timeout - the maximum time to waitunit - the time unit of the timeout argument
public Boolean[] getAll(long timeout,
TimeUnit unit)
public boolean isCancelled()
isCancelled in interface Future<Boolean>public boolean isDone()
isDone in interface Future<Boolean>public Future<Boolean>[] getFutures()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||