Class ThreadPool


  • public class ThreadPool
    extends Object
    POJO representing thread pool.
    • Field Detail

      • name

        private String name
        The name.
      • maxThreads

        private int maxThreads
        The max threads.
      • minSpareThreads

        private int minSpareThreads
        The min spare threads.
      • maxSpareThreads

        private int maxSpareThreads
        The max spare threads.
      • currentThreadCount

        private int currentThreadCount
        The current thread count.
      • currentThreadsBusy

        private int currentThreadsBusy
        The current threads busy.
    • Constructor Detail

      • ThreadPool

        public ThreadPool()
    • Method Detail

      • getName

        public String getName()
        Gets the name.
        Returns:
        the name
      • setName

        public void setName​(String name)
        Sets the name.
        Parameters:
        name - the new name
      • getMaxThreads

        public int getMaxThreads()
        Gets the max threads.
        Returns:
        the max threads
      • setMaxThreads

        public void setMaxThreads​(int maxThreads)
        Sets the max threads.
        Parameters:
        maxThreads - the new max threads
      • getMinSpareThreads

        public int getMinSpareThreads()
        Gets the min spare threads.
        Returns:
        the min spare threads
      • setMinSpareThreads

        public void setMinSpareThreads​(int minSpareThreads)
        Sets the min spare threads.
        Parameters:
        minSpareThreads - the new min spare threads
      • getMaxSpareThreads

        public int getMaxSpareThreads()
        Gets the max spare threads.
        Returns:
        the max spare threads
      • setMaxSpareThreads

        public void setMaxSpareThreads​(int maxSpareThreads)
        Sets the max spare threads.
        Parameters:
        maxSpareThreads - the new max spare threads
      • getCurrentThreadCount

        public int getCurrentThreadCount()
        Gets the current thread count.
        Returns:
        the current thread count
      • setCurrentThreadCount

        public void setCurrentThreadCount​(int currentThreadCount)
        Sets the current thread count.
        Parameters:
        currentThreadCount - the new current thread count
      • getCurrentThreadsBusy

        public int getCurrentThreadsBusy()
        Gets the current threads busy.
        Returns:
        the current threads busy
      • setCurrentThreadsBusy

        public void setCurrentThreadsBusy​(int currentThreadsBusy)
        Sets the current threads busy.
        Parameters:
        currentThreadsBusy - the new current threads busy