|
GigaSpaces - Open Spaces | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openspaces.core.executor.support.WaitForAllListener<T>
public class WaitForAllListener<T>
A listener that can be used to set on several execution and then wait
for all the results (using waitForResult()
. The number of executions
needs to be known in advance and set in the constructor.
Constructor Summary | |
---|---|
WaitForAllListener(int numberOfResults)
Constructs a new listener with the number of executions this listener will be set on. |
|
WaitForAllListener(int numberOfResults,
com.gigaspaces.async.AsyncFutureListener<T> listener)
Constructs a new listener with the number of executions this listener will be set on with an optional delegate listener. |
Method Summary | |
---|---|
void |
onResult(com.gigaspaces.async.AsyncResult<T> result)
|
Future<T>[] |
waitForResult()
Waits for all the results indefently. |
Future<T>[] |
waitForResult(long timeout,
TimeUnit unit)
Waits for all the results for the given time period. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WaitForAllListener(int numberOfResults)
public WaitForAllListener(int numberOfResults, com.gigaspaces.async.AsyncFutureListener<T> listener)
Method Detail |
---|
public void onResult(com.gigaspaces.async.AsyncResult<T> result)
onResult
in interface com.gigaspaces.async.AsyncFutureListener<T>
public Future<T>[] waitForResult() throws InterruptedException
InterruptedException
public Future<T>[] waitForResult(long timeout, TimeUnit unit) throws InterruptedException
InterruptedException
|
GigaSpaces - Open Spaces | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |