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 TypeMethodDescriptionvoidexecuteWithHighPriority(Runnable runnable) Executes the specified runnable with high priority.voidexecuteWithLowPriority(Runnable runnable) Executes the specified runnable with normal priority.voidexecuteWithNormalPriority(Runnable runnable) Executes the specified runnable with normal priority.intReturns the number of runnables waiting for execution with high priority.static ExecutionServiceReturns the singleton instance.intReturns the number of runnables waiting for execution with low priority.intReturns 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
-