Class ThreadPoolExecutor


  • public class ThreadPoolExecutor
    extends Object
    Author:
    Christian Zeyen
    • Constructor Detail

      • ThreadPoolExecutor

        public ThreadPoolExecutor()
      • ThreadPoolExecutor

        public ThreadPoolExecutor​(int numberOfThreads)
    • Method Detail

      • addTask

        public void addTask​(Runnable task)
        Add a task to this executor to be executed by the available threads
        Parameters:
        task - task to add
      • execute

        public void execute()
        Starts execution and waits for all submitted tasks to be executed.
      • getTimeoutMillis

        public long getTimeoutMillis()
      • setTimeoutMillis

        public void setTimeoutMillis​(long timeoutMillis)
      • getNumberOfThreads

        public int getNumberOfThreads()
      • getTotalNumberOfTasks

        public int getTotalNumberOfTasks()