Package org.csstudio.java.thread
Class ExecutionService
java.lang.Object
org.csstudio.java.thread.ExecutionService
Service for the execution of asynchronous tasks using thread pools.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
executeWithHighPriority
(Runnable runnable) Executes the specified runnable with high priority.void
executeWithLowPriority
(Runnable runnable) Executes the specified runnable with normal priority.void
executeWithNormalPriority
(Runnable runnable) Executes the specified runnable with normal priority.int
Returns the number of runnables waiting for execution with high priority.static ExecutionService
Returns the singleton instance.int
Returns the number of runnables waiting for execution with low priority.int
Returns the number of runnables waiting for execution with normal priority.
-
Method Details
-
getInstance
Returns the singleton instance.- Returns:
- the singleton instance
-
executeWithHighPriority
Executes the specified runnable with high priority.- Parameters:
runnable
- the runnable
-
executeWithNormalPriority
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
Executes the specified runnable with normal priority.- Parameters:
runnable
- the runnable
-
getScheduledExecutorService
-