Class CompositeBackgroundJob.SubJobMonitor

    • Constructor Detail

    • Method Detail

      • getScheduledJobId

        public java.lang.String getScheduledJobId()
        Description copied from interface: BackgroundJobMonitor
        Get the identifier assigned to the BackgroundJob by the scheduler.
        This ID uniquely identifies the job instance among all jobs managed by the scheduler. Since a single job instance is never executed more than once, it equivalently identifies that particular execution.
        Specified by:
        getScheduledJobId in interface BackgroundJobMonitor
        Returns:
        the id.
      • announceTotal

        public void announceTotal​(int totalItems)
        Description copied from interface: BackgroundJobMonitor
        Announce the total amount of work to be done.

        The BackgroundJob should call this method at the beginning of its execution, as soon as it knows what lies ahead. It is ok to call this method multiple times with different values to update an initial assessment as new/more detailed information about the work to be done becomes available.
        Specified by:
        announceTotal in interface BackgroundJobMonitor
        Parameters:
        totalItems - the total units of work to be done.
      • reportProgressIncrement

        public void reportProgressIncrement​(int items)
        Description copied from interface: BackgroundJobMonitor
        Report units of work completed since the last progress report.

        The BackgroundJob can use this method to report relative increments.
        Specified by:
        reportProgressIncrement in interface BackgroundJobMonitor
        Parameters:
        items - number of units of work completed since the last call.
      • reportProgressAbsolute

        public void reportProgressAbsolute​(int items)
        Description copied from interface: BackgroundJobMonitor
        Report units of work completed since the begining of the job.

        The BackgroundJob can use this method to report the absolute amount of work that was tackled since the execution started.
        Specified by:
        reportProgressAbsolute in interface BackgroundJobMonitor
        Parameters:
        items - number of units of work completed since execution started.
      • isAborting

        public boolean isAborting()
        Description copied from interface: BackgroundJobMonitor
        Whether the cancellation of the job was requested.

        When true is returned, the scheduler has already tried set the interrupt flag on the thread executing the job. BackgroundJobs should poll this method in regular intervals and exit as quickly as possible if true is returned.
        Specified by:
        isAborting in interface BackgroundJobMonitor
        Returns:
        true, if the job should abort its execution.