Class JobControl


  • public class JobControl
    extends java.lang.Object
    Provides status over running maintenance jobs. This is multi-thread safe.
    Author:
    bratseth
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> inactiveJobs()
      Returns a snapshot containing the currently inactive jobs in this
      boolean isActive​(java.lang.String jobSimpleClassName)
      Returns true if this job is not currently deactivated
      java.util.Set<java.lang.String> jobs()
      Returns a snapshot of the set of jobs started on this system (whether deactivated or not).
      Mutex lockJob​(java.lang.String jobSimpleClassName)
      Acquire lock for running given job
      void run​(java.lang.String jobSimpleClassName)
      Run given job (inactive or not) immediately
      void started​(java.lang.String jobSimpleClassName, Maintainer maintainer)
      Notifies this that a job was started
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • started

        public void started​(java.lang.String jobSimpleClassName,
                            Maintainer maintainer)
        Notifies this that a job was started
      • jobs

        public java.util.Set<java.lang.String> jobs()
        Returns a snapshot of the set of jobs started on this system (whether deactivated or not). Each job is represented by its simple (omitting package) class name.
      • inactiveJobs

        public java.util.Set<java.lang.String> inactiveJobs()
        Returns a snapshot containing the currently inactive jobs in this
      • isActive

        public boolean isActive​(java.lang.String jobSimpleClassName)
        Returns true if this job is not currently deactivated
      • run

        public void run​(java.lang.String jobSimpleClassName)
        Run given job (inactive or not) immediately
      • lockJob

        public Mutex lockJob​(java.lang.String jobSimpleClassName)
        Acquire lock for running given job