Class DefaultCaseEngineScheduler

    • Constructor Detail

      • DefaultCaseEngineScheduler

        public DefaultCaseEngineScheduler()
    • Method Detail

      • schedule

        public JobIdentifier schedule​(DcmScheduledJob dcmScheduledJob,
                                      Date triggerTime)
        Description copied from interface: CaseEngineScheduler
        Schedules a job which will be executed when the triggerTime arrives.
        Specified by:
        schedule in interface CaseEngineScheduler
        Parameters:
        dcmScheduledJob - the dcmScheduledJob model containing the necessary information to execute the job.
        triggerTime - the time at which the job will be executed.
        Returns:
        a unique identifier to be able to reschedule/unschedule the job.
      • unscheduleAllForTask

        public void unscheduleAllForTask​(String tenantId,
                                         long caseId,
                                         long taskId)
        Description copied from interface: CaseEngineScheduler
        Unschedules existing jobs for a task.
        Specified by:
        unscheduleAllForTask in interface CaseEngineScheduler
        Parameters:
        tenantId - The id of the tenant
        caseId - The id of the case that the task belongs to
        taskId - The id of the task to unschedule jobs for
      • reschedule

        public void reschedule​(JobIdentifier jobIdentifier,
                               Date newTriggerTime)
        Description copied from interface: CaseEngineScheduler
        Reschedules an existing job at a new time.
        Specified by:
        reschedule in interface CaseEngineScheduler
        Parameters:
        jobIdentifier - the unique identifier obtained by scheduling a job.
        newTriggerTime - the updated time at which the job will be executed.
      • hasJob

        public boolean hasJob​(JobIdentifier jobIdentifier)
        Description copied from interface: CaseEngineScheduler
        Check if a job exists.
        Specified by:
        hasJob in interface CaseEngineScheduler
        Parameters:
        jobIdentifier - the unique identifier obtained by scheduling a job.
        Returns:
        job exists
      • getJob

        public DcmScheduledJob getJob​(JobIdentifier jobIdentifier)
        Description copied from interface: CaseEngineScheduler
        Get the job information.
        Specified by:
        getJob in interface CaseEngineScheduler
        Parameters:
        jobIdentifier - the unique identifier obtained by scheduling a job.
        Returns:
        dcmScheduledJob the dcmScheduledJob model containing the necessary information to execute the job.