Class JobSvc


  • public class JobSvc
    extends Object

    Provides a job value object svc class.

    Examples

    Please find the job svc examples below.

    Process or Cancels a Job

    This Groovy example shows how to cancel or process a job.

     import com.avoka.tm.svc.*
     import com.avoka.tm.vo.*
    
     new JobSvc(job)
         .cancel()
    
     new JobSvc()
         .setId(123)
         .process() 
    Since:
    19.5.0
    • Constructor Detail

      • JobSvc

        public JobSvc()
        Create a job service.
      • JobSvc

        public JobSvc​(Job job)
        Create a job service setting the job to update.
        Parameters:
        job - the Job to update.
    • Method Detail

      • setId

        public JobSvc setId​(Long id)
        Set the id of the job to update.
        Parameters:
        id - the id (Long) of the job to update
        Returns:
        the job updater
      • process

        public void process()
        Process the job immediately.
      • cancel

        public boolean cancel()
        Cancel the job.