Class SubmissionQueueUtils

java.lang.Object
org.eclipse.scanning.event.util.SubmissionQueueUtils

public class SubmissionQueueUtils extends Object
This class can be used to get information about the submission queue e.g. whether there it is currently empty, or whether there is a job currently running. TODO: refactor - add isQueueEmpty method to IJobQueue?
  • Method Details

    • isJobRunningOrPending

      public static boolean isJobRunningOrPending()
      Returns whether there is a job running or pending. This is the case if either a job is running, or the queue is running and not empty.
      Returns:
      true if a job is running or pending, false otherwise
    • isQueueRunning

      public static boolean isQueueRunning() throws EventException
      Returns whether the submission queue is currently running, i.e. it's state is QueueStatus.RUNNING, if false it may be either QueueStatus.PAUSED or QueueStatus.STOPPED.
      Returns:
      true if the submission queue is running, false otherwise
      Throws:
      EventException
    • isQueueEmpty

      public static boolean isQueueEmpty() throws EventException
      Throws:
      EventException
    • isJobRunning

      public static boolean isJobRunning() throws EventException
      Throws:
      EventException