|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jppf.client.JPPFResultCollector
public class JPPFResultCollector
Implementation of the TaskResultListener interface
that can be used "as is" to collect the results of an asynchronous job submission.
org.jppf.client.JPPFClient#submitNonBlocking(List, org.jppf.task.storage.DataProvider, TaskResultListener)| Field Summary | |
|---|---|
protected int |
pendingCount
Count of results notr yet received. |
protected Map<Integer,JPPFTask> |
resultMap
A map containing the resulting tasks, ordered by ascending position in the submitted list of tasks. |
protected List<JPPFTask> |
results
The list of final resulting tasks. |
| Constructor Summary | |
|---|---|
JPPFResultCollector(int count)
Initialize this collector with a specified number of tasks. |
|
| Method Summary | |
|---|---|
List<JPPFTask> |
getResults()
Get the list of final results. |
void |
resultsReceived(TaskResultEvent event)
Called to notify that the results of a number of tasks have been received from the server. |
List<JPPFTask> |
waitForResults()
Wait until all results of a request have been collected. |
List<JPPFTask> |
waitForResults(long millis)
Wait until all results of a request have been collected, or the timeout has expired, whichever happens first. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int pendingCount
protected Map<Integer,JPPFTask> resultMap
protected List<JPPFTask> results
| Constructor Detail |
|---|
public JPPFResultCollector(int count)
count - the count of submitted tasks.| Method Detail |
|---|
public void resultsReceived(TaskResultEvent event)
resultsReceived in interface TaskResultListenerevent - a notification of completion for a set of submitted tasks.TaskResultListener.resultsReceived(org.jppf.client.event.TaskResultEvent)public List<JPPFTask> waitForResults()
public List<JPPFTask> waitForResults(long millis)
millis - the maximum time to wait, zero meaning an indefinite wait.
public List<JPPFTask> getResults()
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||