Interface Scheduler


  • public interface Scheduler
    The container provides a built-in bean with bean type Scheduler and qualifier Default.
    • Method Detail

      • pause

        void pause()
        Pause the scheduler. No triggers are fired.
      • pause

        void pause​(String identity)
        Pause a specific job. Identity must not be null and non-existent identity results in no-op.
        Parameters:
        identity -
        See Also:
        Scheduled.identity()
      • resume

        void resume()
        Resume the scheduler. Triggers can be fired again.
      • resume

        void resume​(String identity)
        Resume a specific job. Identity must not be null and non-existent identity results in no-op.
        Parameters:
        identity -
        See Also:
        Scheduled.identity()
      • isPaused

        boolean isPaused​(String identity)
        Identity must not be null and false is returned for non-existent identity.
        Parameters:
        identity -
        Returns:
        true if the job with the given identity is paused, false otherwise
        See Also:
        Scheduled.identity()
      • isRunning

        boolean isRunning()
        Returns:
        true if a scheduler is running the triggers are fired and jobs are executed, false otherwise
      • getScheduledJobs

        List<Trigger> getScheduledJobs()
        Returns:
        an immutable list of scheduled jobs represented by their trigger.
      • getScheduledJob

        Trigger getScheduledJob​(String identity)
        Returns:
        the trigger of a specific job or null for non-existent identity.