public class JobResults extends org.jppf.utils.concurrent.ThreadSynchronization implements Serializable
| Constructor and Description |
|---|
JobResults() |
| Modifier and Type | Method and Description |
|---|---|
void |
addResults(List<org.jppf.node.protocol.Task<?>> tasks)
Add the specified results to this job.
|
void |
clear()
Clear all results in case the job is manually resubmitted.
|
Collection<org.jppf.node.protocol.Task<?>> |
getAllResults()
Get all the tasks received as results for this job.
|
List<org.jppf.node.protocol.Task<?>> |
getResultsList()
Get all the tasks received as results for this job.
|
org.jppf.node.protocol.Task<?> |
getResultTask(int position)
Get the result for the task at the specified position.
|
boolean |
hasResult(int position)
Determine whether this job received a result for the task at the specified position.
|
int |
size()
Get the current number of received results.
|
String |
toString() |
org.jppf.node.protocol.Task<?> |
waitForTask(int position)
Wait for the execution results of the specified task to be received.
|
org.jppf.node.protocol.Task<?> |
waitForTask(int position,
long timeout)
Wait for the execution results of the specified task to be received.
|
public int size()
public boolean hasResult(int position)
position - the task position to check.true if a result was received, false otherwise.public org.jppf.node.protocol.Task<?> getResultTask(int position)
position - the position of the task to get.Task instance, or null if no result was received for a task at this position.public void addResults(List<org.jppf.node.protocol.Task<?>> tasks)
tasks - the list of tasks for which results were received.public Collection<org.jppf.node.protocol.Task<?>> getAllResults()
Task instances.public List<org.jppf.node.protocol.Task<?>> getResultsList()
Task instances.public org.jppf.node.protocol.Task<?> waitForTask(int position)
position - the position of the task in the job it is a part of.public org.jppf.node.protocol.Task<?> waitForTask(int position,
long timeout)
position - the position of the task in the job it is a part of.timeout - maximum number of milliseconds to wait.public void clear()
Copyright © 2005-2019 JPPF Team.