Class ThreadManagerThreadPool

java.lang.Object
org.jppf.execute.AbstractThreadManager
org.jppf.execute.ThreadManagerThreadPool
All Implemented Interfaces:
ThreadManager

public class ThreadManagerThreadPool extends AbstractThreadManager
This class manages the thread pool pool for the node's execution manager.
Author:
Laurent Cohen, Martin JANDA
  • Constructor Details

    • ThreadManagerThreadPool

      public ThreadManagerThreadPool()
      Initialize this thread manager.
    • ThreadManagerThreadPool

      public ThreadManagerThreadPool(int poolSize)
      Initialize this thread manager.
      Parameters:
      poolSize - the initial size of the thread pool.
    • ThreadManagerThreadPool

      public ThreadManagerThreadPool(int poolSize, long ttl)
      Initialize this thread manager.
      Parameters:
      poolSize - the initial size of the thread pool.
      ttl - the time to live of the threads, in seconds.
  • Method Details

    • getThreadIds

      protected long[] getThreadIds()
      Description copied from class: AbstractThreadManager
      Get the ids of all managed threads.
      Specified by:
      getThreadIds in class AbstractThreadManager
      Returns:
      the ids as an array of long values, may be an empty but never null array.
    • getExecutorService

      public ExecutorService getExecutorService()
      Description copied from interface: ThreadManager
      Get the thread pool that really processes the tasks
      Returns:
      a ThreadPoolExecutor instance.
    • setPoolSize

      public void setPoolSize(int size)
      Description copied from interface: ThreadManager
      Set the size of the node's thread pool.
      Parameters:
      size - the size as an int.
    • getPoolSize

      public int getPoolSize()
      Description copied from interface: ThreadManager
      Get the size of the node's thread pool.
      Returns:
      the size as an int.
    • getPriority

      public int getPriority()
      Description copied from interface: ThreadManager
      Get the priority assigned to the execution threads.
      Returns:
      the priority as an int value.
    • setPriority

      public void setPriority(int priority)
      Description copied from interface: ThreadManager
      Update the priority of all execution threads.
      Parameters:
      priority - the new priority to set.
    • useClassLoader

      public ThreadManager.UsedClassLoader useClassLoader(ClassLoader classLoader)
      Description copied from interface: ThreadManager
      Use class loader in this thread manager.
      Parameters:
      classLoader - a ClassLoader instance.
      Returns:
      a UsedClassLoader instance. Never return null.