Class ServerJobBroadcast

All Implemented Interfaces:
org.jppf.node.protocol.JPPFDistributedJob

public class ServerJobBroadcast extends ServerJob
Author:
Martin JANDA
  • Field Details

    • pendingTasksCount

      protected int pendingTasksCount
      Number 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 - an ChangeListener instance 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 - an ChangeListener instance 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

      public String getBroadcastUUID()
      Description copied from class: AbstractServerJob
      Get the broadcast UUID.
      Overrides:
      getBroadcastUUID in class AbstractServerJob
      Returns:
      an String instance.
    • createBroadcastJob

      public ServerJobBroadcast createBroadcastJob(String broadcastUUID)
      Make a copy of this client job wrapper.
      Parameters:
      broadcastUUID - the broadcast UUID.
      Returns:
      a new ServerJob instance.
    • jobDispatched

      public void jobDispatched(ServerTaskBundleNode bundle)
      Description copied from class: AbstractServerJobBase
      Called when all or part of a job is dispatched to a node.
      Overrides:
      jobDispatched in class AbstractServerJobBase
      Parameters:
      bundle - the dispatched job.
    • broadcastDispatched

      protected void broadcastDispatched(ServerJobBroadcast broadcastJob)
      Called when all or part of broadcast job is dispatched to a driver.
      Parameters:
      broadcastJob - the dispatched job.
    • broadcastCompleted

      protected void broadcastCompleted(ServerJobBroadcast broadcastJob)
      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

      public void resultsReceived(ServerTaskBundleNode bundle, List<org.jppf.io.DataLocation> results)
      Description copied from class: ServerJob
      Called to notify that the results of a number of tasks have been received from the server.
      Overrides:
      resultsReceived in class ServerJob
      Parameters:
      bundle - the executing job.
      results - the list of tasks whose results have been received from the server.
    • resultsReceived

      public void resultsReceived(ServerTaskBundleNode bundle, Throwable throwable)
      Description copied from class: ServerJob
      Called to notify that throwable eventually raised while receiving the results.
      Overrides:
      resultsReceived in class ServerJob
      Parameters:
      bundle - the finished job.
      throwable - the throwable that was raised while receiving the results.
    • addBundle

      public boolean addBundle(ServerTaskBundleClient clientBundle)
      Description copied from class: AbstractServerJobBase
      Add received bundle to this server job.
      Overrides:
      addBundle in class AbstractServerJobBase
      Parameters:
      clientBundle - the bundle to add.
      Returns:
      true when bundle was added to job. false when job is COMPLETE.
    • cancel

      public boolean cancel(JPPFDriver driver, boolean mayInterruptIfRunning)
      Description copied from class: ServerJob
      Cancel this job.
      Overrides:
      cancel in class ServerJob
      Parameters:
      driver - reference to the JPPF driver.
      mayInterruptIfRunning - true if the job may be interrupted.
      Returns:
      true if the job was effectively cncelled, false if it was already cancelled previously.
    • getParentJob

      public ServerJobBroadcast getParentJob()
      Returns:
      the parent job of this broadcast.
    • getDispatchedBroadcasts

      public List<ServerJobBroadcast> getDispatchedBroadcasts()
      Returns:
      the broadcast jobs that were dispatched to a node.
    • getSLA

      public org.jppf.node.protocol.JobSLA getSLA()
      Description copied from class: AbstractServerJob
      Get the service level agreement between the job and the server.
      Specified by:
      getSLA in interface org.jppf.node.protocol.JPPFDistributedJob
      Overrides:
      getSLA in class AbstractServerJob
      Returns:
      an instance of JobSLA.
    • setSLA

      public void setSLA(org.jppf.node.protocol.JobSLA sla)
      Description copied from class: AbstractServerJob
      Get the service level agreement between the job and the server.
      Overrides:
      setSLA in class AbstractServerJob
      Parameters:
      sla - an instance of JobSLA.