Class ExecutionService

java.lang.Object
org.csstudio.java.thread.ExecutionService

public class ExecutionService extends Object
Service for the execution of asynchronous tasks using thread pools.
  • Method Details

    • getInstance

      public static ExecutionService getInstance()
      Returns the singleton instance.
      Returns:
      the singleton instance
    • executeWithHighPriority

      public void executeWithHighPriority(Runnable runnable)
      Executes the specified runnable with high priority.
      Parameters:
      runnable - the runnable
    • executeWithNormalPriority

      public void executeWithNormalPriority(Runnable runnable)
      Executes the specified runnable with normal priority.
      Parameters:
      runnable - the runnable
    • getHighPriorityQueueSize

      public int getHighPriorityQueueSize()
      Returns the number of runnables waiting for execution with high priority.
    • getNormalPriorityQueueSize

      public int getNormalPriorityQueueSize()
      Returns the number of runnables waiting for execution with normal priority.
    • getLowPriorityQueueSize

      public int getLowPriorityQueueSize()
      Returns the number of runnables waiting for execution with low priority.
    • executeWithLowPriority

      public void executeWithLowPriority(Runnable runnable)
      Executes the specified runnable with normal priority.
      Parameters:
      runnable - the runnable
    • getScheduledExecutorService

      public ScheduledExecutorService getScheduledExecutorService()