Package org.jppf.server.protocol
Class ServerJobBroadcast
java.lang.Object
org.jppf.server.protocol.AbstractServerJob
org.jppf.server.protocol.AbstractServerJobBase
org.jppf.server.protocol.ServerJob
org.jppf.server.protocol.ServerJobBroadcast
- All Implemented Interfaces:
org.jppf.node.protocol.JPPFDistributedJob
- Author:
- Martin JANDA
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intNumber of remaining tasks that have not completed.Fields inherited from class org.jppf.server.protocol.AbstractServerJobBase
channelSet, clientBundles, dataProvider, dependendedOnTasks, dispatchSet, onRequeue, tasks, totalDispatchesFields inherited from class org.jppf.server.protocol.AbstractServerJob
completionBundles, id, job, jobExpired, jobReceivedTime, lock, name, notificationEmitter, onDoneList, pending, queueEntryTime, removalCondition, status, submissionStatus, uuid -
Constructor Summary
ConstructorsModifierConstructorDescriptionServerJobBroadcast(Lock lock, ServerJobChangeListener notificationEmitter, org.jppf.node.protocol.TaskBundle job, org.jppf.io.DataLocation dataProvider) Initialized broadcast job with task bundle and data provider.protectedServerJobBroadcast(Lock lock, ServerJobChangeListener notificationEmitter, org.jppf.node.protocol.TaskBundle job, org.jppf.io.DataLocation dataProvider, ServerJobBroadcast parentJob, String broadcastUUID) Initialized broadcast job with task bundle and data provider. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddBundle(ServerTaskBundleClient clientBundle) Add received bundle to this server job.protected voidbroadcastCompleted(ServerJobBroadcast broadcastJob) Called to notify that the execution of broadcast job has completed.protected voidbroadcastDispatched(ServerJobBroadcast broadcastJob) Called when all or part of broadcast job is dispatched to a driver.booleancancel(JPPFDriver driver, boolean mayInterruptIfRunning) Cancel this job.createBroadcastJob(String broadcastUUID) Make a copy of this client job wrapper.Get the broadcast UUID.org.jppf.node.protocol.JobSLAgetSLA()Get the service level agreement between the job and the server.voidjobDispatched(ServerTaskBundleNode bundle) Called when all or part of a job is dispatched to a node.voidjobEnded()Called when the entire broadcast job is complete.voidresultsReceived(ServerTaskBundleNode bundle, Throwable throwable) Called to notify that throwable eventually raised while receiving the results.voidresultsReceived(ServerTaskBundleNode bundle, List<org.jppf.io.DataLocation> results) Called to notify that the results of a number of tasks have been received from the server.voidsetSLA(org.jppf.node.protocol.JobSLA sla) Get the service level agreement between the job and the server.Methods inherited from class org.jppf.server.protocol.ServerJob
cancelDispatch, createNodeDispatch, getAvailableGraphNodeCount, getNodeJobInformation, getTaskGraph, hasAvailableGraphNode, taskCompleted, updateMethods inherited from class org.jppf.server.protocol.AbstractServerJobBase
getClientBundles, getDataProvider, getDispatchSet, getNbBundles, getNbChannels, getNbDispatches, getNbDispatches, getNodeBundle, getTaskCount, getTotalDispatches, hasCompleted, hasPending, isJobGraphAlreadyHandled, jobReturned, merge, setOnRequeue, toStringMethods inherited from class org.jppf.server.protocol.AbstractServerJob
addOnDone, done, fireJobDispatched, fireJobReturned, fireJobUpdated, getCompletionBundles, getInitialTaskCount, getJob, getJobReceivedTime, getLock, getMetadata, getName, getQueueEntryTime, getRemovalCondition, getSubmissionStatus, getUuid, isCancelled, isJobExpired, isPending, isPersistent, isSuspended, jobExpired, removeOnDone, setCancelled, setJobReceivedTime, setMaxNodes, setMetadata, setName, setPending, setQueueEntryTime, setSubmissionStatus, setSuspended, setUuid, updateJobDataLocation, updateStatus
-
Field Details
-
pendingTasksCount
protected int pendingTasksCountNumber of remaining tasks that have not completed.
-
-
Constructor Details
-
ServerJobBroadcast
public ServerJobBroadcast(Lock lock, ServerJobChangeListener notificationEmitter, org.jppf.node.protocol.TaskBundle job, org.jppf.io.DataLocation dataProvider) Initialized broadcast job with task bundle and data provider.- Parameters:
lock- used to synchronized access to job.notificationEmitter- anChangeListenerinstance that fires job notifications.job- underlying task bundle.dataProvider- the data location of the data provider.
-
ServerJobBroadcast
protected ServerJobBroadcast(Lock lock, ServerJobChangeListener notificationEmitter, org.jppf.node.protocol.TaskBundle job, org.jppf.io.DataLocation dataProvider, ServerJobBroadcast parentJob, String broadcastUUID) Initialized broadcast job with task bundle and data provider.- Parameters:
lock- used to synchronized access to job.notificationEmitter- anChangeListenerinstance that fires job notifications.job- underlying task bundle.dataProvider- the data location of the data provider.parentJob- instance of parent broadcast job.broadcastUUID- the broadcast UUID.
-
-
Method Details
-
getBroadcastUUID
Description copied from class:AbstractServerJobGet the broadcast UUID.- Overrides:
getBroadcastUUIDin classAbstractServerJob- Returns:
- an
Stringinstance.
-
createBroadcastJob
Make a copy of this client job wrapper.- Parameters:
broadcastUUID- the broadcast UUID.- Returns:
- a new
ServerJobinstance.
-
jobDispatched
Description copied from class:AbstractServerJobBaseCalled when all or part of a job is dispatched to a node.- Overrides:
jobDispatchedin classAbstractServerJobBase- Parameters:
bundle- the dispatched job.
-
broadcastDispatched
Called when all or part of broadcast job is dispatched to a driver.- Parameters:
broadcastJob- the dispatched job.
-
broadcastCompleted
Called to notify that the execution of broadcast job has completed.- Parameters:
broadcastJob- the completed job.
-
jobEnded
public void jobEnded()Called when the entire broadcast job is complete. -
resultsReceived
Description copied from class:ServerJobCalled to notify that the results of a number of tasks have been received from the server.- Overrides:
resultsReceivedin classServerJob- Parameters:
bundle- the executing job.results- the list of tasks whose results have been received from the server.
-
resultsReceived
Description copied from class:ServerJobCalled to notify that throwable eventually raised while receiving the results.- Overrides:
resultsReceivedin classServerJob- Parameters:
bundle- the finished job.throwable- the throwable that was raised while receiving the results.
-
addBundle
Description copied from class:AbstractServerJobBaseAdd received bundle to this server job.- Overrides:
addBundlein classAbstractServerJobBase- Parameters:
clientBundle- the bundle to add.- Returns:
truewhen bundle was added to job.falsewhen job isCOMPLETE.
-
cancel
Description copied from class:ServerJobCancel this job. -
getParentJob
- Returns:
- the parent job of this broadcast.
-
getDispatchedBroadcasts
- Returns:
- the broadcast jobs that were dispatched to a node.
-
getSLA
public org.jppf.node.protocol.JobSLA getSLA()Description copied from class:AbstractServerJobGet the service level agreement between the job and the server.- Specified by:
getSLAin interfaceorg.jppf.node.protocol.JPPFDistributedJob- Overrides:
getSLAin classAbstractServerJob- Returns:
- an instance of
JobSLA.
-
setSLA
public void setSLA(org.jppf.node.protocol.JobSLA sla) Description copied from class:AbstractServerJobGet the service level agreement between the job and the server.- Overrides:
setSLAin classAbstractServerJob- Parameters:
sla- an instance ofJobSLA.
-