public class ServerTaskBundleNode extends Object
Constructor and Description |
---|
ServerTaskBundleNode(ServerJob job,
JPPFTaskBundle taskBundle,
List taskList)
Initialize this task bundle and set its build number.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Called when this task bundle is cancelled.
|
void |
checkTaskCount()
Check the task count in this node bundle is equal to the one in its
JPPFTaskBundle . |
ExecutorChannel |
getChannel()
Get the channel to which the job is dispatched.
|
ServerJob |
getClientJob()
Get the client job this submission is for
|
DataLocation |
getDataProviderL()
Get shared data provider for this task.
|
Future<?> |
getFuture()
Get the future corresponding to the channel dispatch.
|
JPPFTaskBundle |
getJob()
Get the job this submission is for.
|
int |
getTaskCount()
Get the number of tasks in this node bundle.
|
List |
getTaskList()
Get the tasks to be executed by the node.
|
boolean |
isCancelled()
Get the cancelled indicator.
|
boolean |
isRequeued()
Get the requeued indicator.
|
void |
jobDispatched(ExecutorChannel channel,
Future<?> future)
Called when all or part of a job is dispatched to a node.
|
void |
resubmit()
Called when this task bundle should be resubmitted
|
void |
resultsReceived(List results)
Called to notify that the results of a number of tasks have been received from the server.
|
void |
resultsReceived(Throwable throwable)
Called to notify that throwable eventually raised while receiving the results.
|
void |
taskCompleted(Exception exception)
Called to notify that the execution of a task has completed.
|
String |
toString() |
public ServerTaskBundleNode(ServerJob job, JPPFTaskBundle taskBundle, List taskList)
job
- the job to execute.taskBundle
- the job.taskList
- the tasks to execute.public JPPFTaskBundle getJob()
JPPFTaskBundle
instance.public ServerJob getClientJob()
ServerJob
instance.public DataLocation getDataProviderL()
DataProvider
instance.public List getTaskList()
List
of arrays of bytes.public void jobDispatched(ExecutorChannel channel, Future<?> future)
channel
- the node to which the job is dispatched.future
- future assigned to bundle execution.public void resultsReceived(List results)
results
- the list of tasks whose results have been received from the server.public void resultsReceived(Throwable throwable)
throwable
- the throwable that was raised while receiving the results.public void taskCompleted(Exception exception)
exception
- the Exception
thrown during job execution or null
.public void resubmit()
public boolean isRequeued()
true
if job is requeued, false
otherwise.public void cancel()
public boolean isCancelled()
true
if job is cancelled, false
otherwise.public ExecutorChannel getChannel()
ExecutorChannel
instance.public Future<?> getFuture()
Future
instance.public void checkTaskCount()
JPPFTaskBundle
.public int getTaskCount()
Copyright © 2005-2012 JPPF Team.