|
GigaSpaces XAP 10.0.1 API | |||||||||
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,
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(AsyncResult<T> result)
A callback when a result of an async invocation arrives. |
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, AsyncFutureListener<T> listener)
Method Detail |
---|
public void onResult(AsyncResult<T> result)
AsyncFutureListener
onResult
in interface AsyncFutureListener<T>
public Future<T>[] waitForResult() throws InterruptedException
InterruptedException
public Future<T>[] waitForResult(long timeout, TimeUnit unit) throws InterruptedException
InterruptedException
|
GigaSpaces XAP 10.0.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |