Interface JobEntry

    • Method Detail

      • setActive

        void setActive​(boolean isActive)
        Sets whether the job is running.
        Parameters:
        isActive - Whether the job is running.
      • isActive

        boolean isActive()
        Check to see if job is currently active/running
        Returns:
        true if job is currently being run by the worker thread, otherwise false
      • isNew

        boolean isNew()
        Check to see if job is new
        Returns:
        true if job is not yet saved, otherwise false
      • getJobId

        int getJobId()
        Get the value of jobId.
        Returns:
        int
      • setJobId

        void setJobId​(int v)
        Set the value of jobId.
        Parameters:
        v - new value
      • setTask

        void setTask​(String v)
        Set the value of Task
        Parameters:
        v - new value
      • getNextRuntime

        long getNextRuntime()
        Get the next runtime for this job as a long.
        Returns:
        The next run time as a long.
      • getNextRunDate

        Date getNextRunDate()
        Gets the next runtime as a date
        Returns:
        Next run date
      • getNextRunAsString

        String getNextRunAsString()
        Get the next runtime for this job as a String.
        Returns:
        The next run time as a String.
      • calcRunTime

        void calcRunTime()
                  throws TurbineException
        Calculate how long before the next runtime.
        The runtime determines it's position in the job queue. Here's the logic:
        1. Create a date the represents when this job is to run.
        2. If this date has expired, them "roll" appropriate date fields forward to the next date.
        3. Calculate the diff in time between the current time and the next run time.
        Throws:
        TurbineException - a generic exception.